make_legend: Extract Figure Legend from Individual Plots for Later...

Description Usage Arguments Value

Description

Since ggplot2 does not support superimposing multiple geom_point() with different color codes, MultiFeaturePlot() bypasses the limitation by generating one custom color scale integrating multiple expression data. To get legends for that, individual geom_point() ggplots are generated here, and extracted for later integration with the main plot.

Usage

1
make_legend(featurekey, plotdf)

Arguments

featurekey

a character vector containing the features prefixed by keys (if using Seuratv3) to be plotted

plotdf

a data frame containing cell embedings, expression level, and color codes genearted by bin_expression()

Value

a ggplot2 object


chenyenchung/PlotSeurat documentation built on May 21, 2019, 11:40 a.m.