Description Usage Arguments Details Value Author(s) Examples
Draw Legend Based on Color Mapping
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## S4 method for signature 'ColorMapping'
color_mapping_legend(object,
plot = TRUE, ...,
color_bar = object@type,
title = object@name,
title_gp = gpar(fontsize = 10, fontface = "bold"),
title_position = "topleft",
grid_height = unit(4, "mm"),
grid_width = unit(4, "mm"),
border = NULL,
at = object@levels,
labels = at,
labels_gp = gpar(fontsize = 10),
labels_rot = 0,
nrow = NULL,
ncol = 1,
by_row = FALSE,
legend_height = NULL,
legend_width = NULL,
legend_direction = c("vertical", "horizontal"),
param = NULL)
|
object |
A |
plot |
Whether to plot or just return the legend object? |
... |
Pass to |
color_bar |
"continous" or "discrete". It controls whether to show the discrete legend for the continuous color mapping. |
title |
Title of the legend, by default it is the name of the legend. |
title_gp |
Graphical parameters for legend title. |
title_position |
Position of the title. See |
grid_height |
Height of each legend grid. Pass to |
grid_width |
Width of each legend grid. Pass to |
border |
Color for legend grid borders. Pass to |
at |
Break values of the legend. By default it is the levels in the |
labels |
Labels corresponding to break values. |
labels_gp |
Graphcial parameters for legend labels. |
labels_rot |
Rotation of labels. |
nrow |
Pass to |
ncol |
Pass to |
by_row |
Pass to |
legend_height |
Height of the legend body. It only works when |
legend_width |
Width of the legend body. It only works when |
legend_direction |
When |
param |
All the legend-related parameters can be specified as a single list. |
The legend is constructed by Legend
.
A Legends-class
object.
Zuguang Gu <z.gu@dkfz.de>
1 2 | # There is no example
NULL
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.