[R] Determine Bounds of Current Graph

David Winsemius dwinsemius at comcast.net
Thu Sep 9 16:24:14 CEST 2010


On Sep 9, 2010, at 10:07 AM, Isamoor wrote:

> I'm having trouble determining the bounds of my current graph.  I  
> know how
> to set the bounds up front (ylim & xlim in most cases), but I would  
> rather
> be able to dynamically see what was chosen to use in later code.
>
> Example:
>
> library(maps)
> map('state','Indiana')
> map.axes()

?par

 > bounds <- par("usr")
 > bounds
[1] -88.12964 -84.77184  37.74583  41.82082


> ??Something that lets me know the y-axis is from ~38 to ~42 and  
> store this
> information into a vector
>
> Is there some way to query what the bounds of the current graph are?
>
> Thanks!


David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list