I would like to get the vector of values for axis ticks in an existing plot in ggplot. I know that a ggplot object is a list with 9 elements and I was wondering if somehow I could extract the values for the axis ticks from that list. For example if I produce this toy example:
library(ggplot2)
g=ggplot(data=mtcars,aes(hp,mpg))+geom_point()
What I want are the vectors
c(100,200,300)
c(10,15,20,25,30,35)
for x ticks and y ticks respectively w
Is there a way to to this?
Many thanks!