Mark Borowsky
2009-Mar-20 14:44 UTC
[R] how can I find actual axis limits for an existing plot?
I would like to query an existing plot to learn the actual x and y limits of the plottable area. Is this possible? I can discover the extreme tick mark locations but not the actual plot area limits. Setting the limits with ylim will not help in this case because I am overplotting an existing plot with a separate function, and I don't want my end-user to have to pass parameters around. Thanks, Mark
Eik Vettorazzi
2009-Mar-20 17:21 UTC
[R] how can I find actual axis limits for an existing plot?
Hi,
see ?par
You are probably interested in par("usr")
Mark Borowsky schrieb:> I would like to query an existing plot to learn the actual x and y
> limits of the plottable area. Is this possible? I can discover the
> extreme tick mark locations but not the actual plot area limits.
> Setting the limits with ylim will not help in this case because I am
> overplotting an existing plot with a separate function, and I don't
> want my end-user to have to pass parameters around.
>
> Thanks,
> Mark
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Seemingly Similar Threads
- Question: xyplot panel configurations for Trellis package
- How to auto-scale cex of y-axis labels in lattice dotplot?
- Attempting to sync x-axis labels with grid lines in lattice bwplot
- xyplot gets overplotted by plot
- Aligning axis values when plotting more than one graph on same axes