Re: [R] How to access the attributes of a ggplot?

From: hadley wickham <h.wickham_at_gmail.com>
Date: Tue, 08 Apr 2008 09:24:03 -0500

> Thanks for replying. I know that I can directly modify some of the
> properties of the plot object, but I was more interested in querying
> the current plot properties, something like:
>
> xlimits <- getggopts(pobj, "x_scale_limits")
>
> Is there anything like this implemented?

Ah, that's much more tricky. The problem is that many of these values are not calculated until you actually draw the plot, and then they are immediately thrown away because of the copy-on-modify semantics that I'm following (to match the rest of R). You can access some info about the scales by looking at str(pobj$scales), but most of the interesting stuff isn't calculated until draw time.

Hadley

-- 
http://had.co.nz/

______________________________________________
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.
Received on Tue 08 Apr 2008 - 14:27:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 Apr 2008 - 15:00:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive