Color ramp for bivariate colors
Usage
colorRamp2D(
column_breaks,
row_breaks,
mcolor,
na_color = "grey15",
return_rgb = FALSE,
transparency = 0,
space = "sRGB",
verbose = FALSE,
...
)See also
Other jam utility functions:
ashape(),
avg_angles(),
avg_colors_by_list(),
bulk_cnet_adjustments(),
cell_fun_bivariate(),
collapse_mem_clusters(),
deconcat_df2(),
display_colorRamp2D(),
enrichList2geneHitList(),
find_colname(),
find_enrich_colnames(),
get_hull_data(),
get_igraph_layout(),
gsubs_remove(),
handle_igraph_param_list(),
isColorBlank(),
make_legend_bivariate(),
make_point_hull(),
mem_find_overlap(),
order_colors(),
rank_mem_clusters(),
rotate_coordinates(),
subgraph_jam(),
summarize_node_spacing(),
xyAngle()
Examples
mcolor <- matrix(ncol=3,
c("seashell", "salmon1", "firebrick3",
"gray99", "lightgoldenrod1", "gold",
"aliceblue", "skyblue", "dodgerblue3"));
row_breaks <- c(0, 0.5, 1);
column_breaks <- c(-1, 0, 1);
rownames(mcolor) <- row_breaks;
colnames(mcolor) <- column_breaks;
jamba::imageByColors(mcolor);
title(
cex.main=1.5,
cex.lab=1.5,
main="Bivariate color scale",
xlab="Directionality",
ylab="Score");
col_fun <- colorRamp2D(column_breaks=column_breaks,
row_breaks=row_breaks,
mcolor=mcolor)
display_colorRamp2D(col_fun, pretty.n=c(4, 5));
display_colorRamp2D(col_fun, pretty.n=NULL);
mcolor1 <- matrix(ncol=3,
c("white", "red",
"white", "gold",
"white", "blue3"));
row_breaks1 <- c(0, 1);
column_breaks1 <- c(-1, 0, 1);
rownames(mcolor1) <- row_breaks1;
colnames(mcolor1) <- column_breaks1;
jamba::imageByColors(mcolor1);
col_fun1 <- colorRamp2D(column_breaks=column_breaks1,
row_breaks=row_breaks1,
space="LUV",
mcolor=mcolor1)
display_colorRamp2D(col_fun1);