get_ranges | R Documentation |
Given a ggplot object, get the ranges of the x and y scales.
get_ranges(p)
p |
A ggplot object |
Named list with x and y axis ranges
library(ggplot2)
p <- ggplot(data.frame(x1=1:100,y1=50:-49), aes(x=x1,y=y1)) + geom_point()
get_ranges(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.