Learn R Programming

qtl2 (version 0.42)

plot_colorscale: Heat map color scale

Description

Plot heat map color scale

Usage

plot_colorscale(
  x = NULL,
  zlim = NULL,
  color_scheme = c("viridis", "gray", "revgray", "heat", "terrain", "topo", "rainbow"),
  col = NULL,
  n_colors = 256,
  gridlines = NULL,
  swap_axes = FALSE,
  ...
)

Value

None.

Arguments

x

Values that define the color limits (matrix, data frame, or vector); ignored if zlim is provided.

zlim

Z-axis limits (a pair of numbers)

color_scheme

Color scheme for the heatmap (ignored if col is provided).

col

Optional vector of colors for the heatmap.

n_colors

Number of z-axis colors (ignored if col is provided).

gridlines

Color of gridlines (NULL for default choices; NA to skip them).

swap_axes

If TRUE, make the scale horizontal

...

Additional graphics paramaters.

See Also

plot_scan1_heatmap()

Examples

Run this code
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
map <- insert_pseudomarkers(grav2$gmap, step=1)
probs <- calc_genoprob(grav2, map, error_prob=0.002)
out <- scan1(probs, grav2$pheno)

layout(cbind(1,2), widths=c(4, 1))
par(mar=c(4.1, 4.1, 1.1, 1.1))
plot_scan1_heatmap(out, map, xlab="Chromosome", ylab="Phenotype", mgp.y=c(2.6, 0.3, 0))
par(mar=c(15.1, 3.1, 15.1, 1.1))
plot_colorscale(out)

Run the code above in your browser using DataLab