man/color_mapping_legend-ColorMapping-method.Rd
d1da987e
 \name{color_mapping_legend-ColorMapping-method}
 \alias{color_mapping_legend,ColorMapping-method}
c94e524a
 \alias{color_mapping_legend}
d1da987e
 \title{
ad35494a
 Draw Legend Based on Color Mapping
d1da987e
 }
 \description{
ad35494a
 Draw Legend Based on Color Mapping
d1da987e
 }
 \usage{
ad35494a
 \S4method{color_mapping_legend}{ColorMapping}(object,
     plot = TRUE, ...,
     
     color_bar = object@type,
     
5ab2cb81
     title = object@name,
     title_gp = gpar(fontsize = 10, fontface = "bold"),
ad35494a
     title_position = "topleft",
5ab2cb81
     grid_height = unit(4, "mm"),
     grid_width = unit(4, "mm"),
9487d939
     border = NULL,
5ab2cb81
     at = object@levels,
     labels = at,
     labels_gp = gpar(fontsize = 10),
ad35494a
     labels_rot = 0,
c9d5db63
     nrow = NULL,
     ncol = 1,
bb0ff355
     by_row = FALSE,
ad35494a
     legend_height = NULL,
     legend_width = NULL,
c9d5db63
     legend_direction = c("vertical", "horizontal"),
efb83b62
     break_dist = NULL,
ad35494a
     
8b0c8512
     graphics = NULL,
ba8a5070
     param = NULL)
 }
d1da987e
 \arguments{
 
ad35494a
   \item{object}{A \code{\link{ColorMapping-class}} object.}
   \item{plot}{Whether to plot or just return the legend object?}
   \item{...}{Pass to \code{\link{draw,Legends-method}}.}
   \item{color_bar}{"continous" or "discrete". It controls whether to show the discrete legend for the continuous color mapping.}
   \item{title}{Title of the legend, by default it is the name of the legend.}
   \item{title_gp}{Graphical parameters for legend title.}
   \item{title_position}{Position of the title. See \code{\link{Legend}} for all possible values.}
   \item{grid_height}{Height of each legend grid. Pass to \code{\link{Legend}}.}
   \item{grid_width}{Width of each legend grid. Pass to \code{\link{Legend}}.}
   \item{border}{Color for legend grid borders. Pass to \code{\link{Legend}}.}
   \item{at}{Break values of the legend. By default it is the levels in the \code{\link{ColorMapping-class}} object.}
   \item{labels}{Labels corresponding to break values.}
18765bd5
   \item{labels_gp}{Graphcial parameters for legend labels.}
ad35494a
   \item{labels_rot}{Rotation of labels.}
   \item{nrow}{Pass to \code{\link{Legend}}. It controls the layout of legend grids if they are arranged in multiple rows or columns.}
   \item{ncol}{Pass to \code{\link{Legend}}. It controls the layout of legend grids if they are arranged in multiple rows or columns.}
   \item{by_row}{Pass to \code{\link{Legend}}. It controls the order of legend grids if they are arranged in multiple rows or columns.}
   \item{legend_height}{Height of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{vertical}. Pass to \code{\link{Legend}}.}
   \item{legend_width}{Width of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{horizontal}. Pass to \code{\link{Legend}}.}
   \item{legend_direction}{When \code{color_bar} is \code{continuous}, whether the legend is vertical or horizontal? Pass to \code{\link{Legend}}.}
efb83b62
   \item{break_dist}{A zooming factor to control relative distance of two neighbouring break values.The length of it should be \code{length(at) - 1} or a scalar. }
8b0c8512
   \item{graphics}{Internally used.}
ad35494a
   \item{param}{All the legend-related parameters can be specified as a single list.}
ba8a5070
 
d1da987e
 }
 \details{
ad35494a
 The legend is constructed by \code{\link{Legend}}.
d1da987e
 }
 \value{
ad35494a
 A \code{\link{Legends-class}} object.
d1da987e
 }
 \author{
6f1307c6
 Zuguang Gu <z.gu@dkfz.de>
d1da987e
 }
 \examples{
ad35494a
 # There is no example
 NULL
c94e524a
 
f597719b
 }