split_plot: Plot a fixed size for plot and legend

Description Usage Arguments Value References

View source: R/publication_plotting.R

Description

Creates a grid object comprised of both a plot (ggplot only) and a legend. Function takes a ggplot object as input and returns a grid arrange object with plot on left, legend on right and sizes as dictated by width argument

Usage

1
split_plot(a.gplot, widths = c(4.5/6, 1.5/6))

Arguments

a.gplot

A ggplot2 object

widths

A vector of length 2 specifying the size of the plot grid and legend grid, respectively.

Value

grid arranged plot

References

Puram, S. V. et al. Single-Cell Transcriptomic Analysis of Primary and Metastatic Tumor Ecosystems in Head and Neck Cancer. Cell 171, 1611.e1–1611.e24 (2017).


scfurl/m3addon documentation built on Aug. 9, 2021, 5:30 p.m.