get_plot_limits: Get ggplot Plot Limits

Description Usage Arguments Value Examples

View source: R/get_plot_limits.R

Description

Gets the ranges for the width and height of a ggplot panel.

Usage

1

Arguments

plot

A plot created with ggplot2

Value

A list: xmin, xmax, ymin, ymax

Examples

1
2
3
4
library(ggplot2)
data(iris)
plt <- ggplot(data=iris, aes(x=Species, y=Petal.Length)) + geom_boxplot()
get_plot_limits(plt)

jfq3/QsRutils documentation built on Jan. 18, 2021, 12:40 a.m.