% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_scan1_heatmap.R
\name{plot_scan1_heatmap}
\alias{plot_scan1_heatmap}
\title{Heat map of scan1 results with multiple traits}
\usage{
plot_scan1_heatmap(
  x,
  map,
  chr = NULL,
  y = NULL,
  gap = NULL,
  zlim = NULL,
  color_scheme = c("viridis", "gray", "revgray", "heat", "terrain", "topo", "rainbow"),
  col = NULL,
  n_colors = 256,
  swap_axes = FALSE,
  chrlines = NULL,
  rescale_by = c("none", "col", "chr", "both"),
  ...
)
}
\arguments{
\item{x}{An object of class \code{"scan1"}, as output by \code{\link[=scan1]{scan1()}}.}

\item{map}{A list of vectors of marker positions, as produced by
\code{\link[=insert_pseudomarkers]{insert_pseudomarkers()}}.}

\item{chr}{Selected chromosomes to plot; a vector of character
strings.}

\item{y}{Vector with length equal to \code{ncol(x)}, defining the
y-axis scale of the heat map. (If the multiple LOD scores are
for a quantitative variable like time, these are the
corresponding times.)}

\item{gap}{Gap between chromosomes. The default is 1\% of the total genome length.}

\item{zlim}{Z-axis limits (a pair of numbers)}

\item{color_scheme}{Color scheme for the heatmap (ignored if \code{col} is provided).}

\item{col}{Optional vector of colors for the heatmap.}

\item{n_colors}{Number of z-axis colors (ignored if \code{col} is provided).}

\item{swap_axes}{If TRUE, put chromosome position on y-axis and lod columns on x-axis
(default is to have chromosome position on x-axis and lod columns on y-axis)}

\item{chrlines}{Color of lines at chromosome breaks (NULL for default choices; NA to skip them).}

\item{rescale_by}{Rescale the LOD scores by column, chromosome, or both, by subtracting the
maximum value. The default is not to rescale.}

\item{...}{Additional graphics paramaters.}
}
\value{
None.
}
\description{
Heat map of multiple scan1 results
}
\examples{
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)
plot_scan1_heatmap(out, map)

# make the y-axis quantitative
y <- grav2$phenocovar$time
plot_scan1_heatmap(out, map, y=y, ylab=colnames(grav2$phenocovar))

# plot with colors white -> darkslateblue, and with color scale
col <- colorRampPalette(c("white", "darkslateblue"))(256)
zlim <- c(0, maxlod(out))
layout(cbind(1,2), width=c(3,1))
plot_scan1_heatmap(out, map, y=y, ylab=colnames(grav2$phenocovar),
                   col=col, zlim=zlim)
plot_colorscale(col=col, zlim=zlim)
}
\seealso{
\code{\link[=plot_scan1]{plot_scan1()}}, \code{\link[=plot_lodpeaks]{plot_lodpeaks()}}, \code{\link[graphics:image]{graphics::image()}}; \code{\link[=plot_colorscale]{plot_colorscale()}}
}
