ggplotLims: Get axis limits from a ggplot2 plot object

View source: R/ggplotLims.R

ggplotLimsR Documentation

Get axis limits from a ggplot2 plot object

Description

Get axis limits from a ggplot2 plot object

Usage

ggplotLims(x)

Arguments

x

ggplot2 plot object

Value

named vector of plot axis limits

Examples

library(ggplot2)
dat <- data.frame(
  x = rnorm(1000),
  y = rnorm(1000))
p <- ggplot(dat, aes(x = x, y = y )) +
  geom_point()
ggplotLims(p)


johngodlee/JLGMisc documentation built on June 29, 2024, 9:15 p.m.