View source: R/plot_colorscale.R
| plot_colorscale | R Documentation |
Plot heat map color scale
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,
...
)
x |
Values that define the color limits (matrix, data frame, or vector); ignored if |
zlim |
Z-axis limits (a pair of numbers) |
color_scheme |
Color scheme for the heatmap (ignored if |
col |
Optional vector of colors for the heatmap. |
n_colors |
Number of z-axis colors (ignored if |
gridlines |
Color of gridlines (NULL for default choices; NA to skip them). |
swap_axes |
If TRUE, make the scale horizontal |
... |
Additional graphics paramaters. |
None.
plot_scan1_heatmap()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.