make_legend_bivariate | R Documentation |
Display colors from bivariate color function
make_legend_bivariate(
col_fun,
pretty.n = 5,
name = "bivariate",
xlab = "",
ylab = "",
title = "",
border = TRUE,
digits = 3,
title_fontsize = 11,
legend_fontsize = 10,
grid_height = grid::unit(5, "mm"),
grid_width = grid_height,
row_breaks = NULL,
column_breaks = NULL,
row_gap = grid::unit(0, "mm"),
column_gap = grid::unit(0, "mm"),
...
)
col_fun |
|
pretty.n |
|
name |
|
xlab , ylab |
|
title |
|
border |
|
digits |
|
title_fontsize , legend_fontsize |
|
grid_height , grid_width |
|
row_breaks , column_breaks |
|
row_gap , column_gap |
|
... |
additional arguments are ignored. |
This function produces a "Legend"
object as defined by
ComplexHeatmap::Legend()
.
ComplexHeatmap::Legends-class
object as returned by
ComplexHeatmap::packLegend()
, specifically containing a group
of legends, otherwise known as a legend list.
Other jam utility functions:
avg_angles()
,
avg_colors_by_list()
,
call_fn_ellipsis_deprecated()
,
cell_fun_bivariate()
,
collapse_mem_clusters()
,
colorRamp2D()
,
deconcat_df2()
,
display_colorRamp2D()
,
enrichList2geneHitList()
,
filter_mem_genes()
,
filter_mem_sets()
,
find_colname()
,
get_hull_data()
,
get_igraph_layout()
,
gsubs_remove()
,
handle_igraph_param_list()
,
isColorBlank()
,
make_point_hull()
,
mem_find_overlap()
,
order_colors()
,
rank_mem_clusters()
,
rotate_coordinates()
,
subgraph_jam()
,
subset_mem()
,
summarize_node_spacing()
,
xyAngle()
mcolor <- matrix(ncol=3,
c("white", "salmon1", "firebrick3",
"white", "lightgoldenrod1", "gold",
"white", "skyblue", "dodgerblue3"));
row_breaks <- c(0, 0.5, 5);
column_breaks <- c(-1, 0, 1);
rownames(mcolor) <- row_breaks;
colnames(mcolor) <- column_breaks;
jamba::imageByColors(mcolor);
col_fun <- colorRamp2D(column_breaks=column_breaks,
row_breaks=row_breaks,
mcolor=mcolor)
lgds <- make_legend_bivariate(col_fun,
ylab="-log10pvalue",
xlab="z-score",
pretty.n=5);
jamba::nullPlot(doBoxes=FALSE);
ComplexHeatmap::draw(lgds)
# same as above with slightly larger grid size
# and slightly larger font sizes
lgds <- make_legend_bivariate(col_fun,
ylab="-log10pvalue",
xlab="z-score",
title_fontsize=14,
legend_fontsize=12,
grid_height=grid::unit(7, "mm"),
pretty.n=5);
jamba::nullPlot(doBoxes=FALSE);
ComplexHeatmap::draw(lgds)
lgds <- make_legend_bivariate(col_fun,
ylab="-log10pvalue",
xlab="z-score",
pretty.n=NULL);
jamba::nullPlot(doBoxes=FALSE);
ComplexHeatmap::draw(lgds)
lgds <- make_legend_bivariate(col_fun,
ylab="-log10pvalue",
xlab="z-score",
column_breaks=c(-1, -0.5, 0, 0.5, 1),
row_breaks=c(0, 0.25, 0.5, 0.75, 1),
column_gap=grid::unit(1, "mm"),
row_gap=grid::unit(1, "mm"),
pretty.n=5);
jamba::nullPlot(doBoxes=FALSE);
ComplexHeatmap::draw(lgds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.