View source: R/get_axis_range.R
| get_axis_range | R Documentation |
A function to calculate the range of x- and y- axes.
get_axis_range(plot)
plot |
ggplot output from csv_to_ggplot() |
A list object that has two elements, each of which has two vector values. The first element stores the minimum and maximum values of the plot's x-axis range, while the second element stores the minimum and maximum values of the plot's y-axis range.
library(ggplot2)
ggplot(mtcars) + geom_point(aes(mpg, disp)) -> p1
get_axis_range(p1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.