% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cbar.R
\name{draw.colorbar}
\alias{draw.colorbar}
\title{Draw colorbar into background of current plot.}
\usage{
draw.colorbar(coloredmeshes, horizontal = FALSE, ...)
}
\arguments{
\item{coloredmeshes}{fs.coloredmesh as returned by the coloredmesh.from.* functions.}

\item{horizontal}{logical, whether the colorbar should be drawn in horizontal orientation. Defaults to \code{TRUE}.}

\item{...}{extra params passed to \code{\link[fields]{image.plot}}}
}
\description{
Requires a rgl 3d visualisation to be open that already contains a rendered object. Uses \code{\link[rgl]{bgplot3d}} to add a colorbar in the background of the plot using \code{\link[fields]{image.plot}}. Experimental.
}
\note{
To adapt or change the colormap, you should use the 'makecmap_options' parameter of the vis.* function used to construct the coloredmeshes (e.g., \code{\link[fsbrain]{vis.subject.morph.native}}).
}
\keyword{internal}
