[R] How to get the scale limits in lattice plot

David Winsemius dwinsemius at comcast.net
Thu Apr 1 18:23:59 CEST 2010

On Apr 1, 2010, at 11:53 AM, James Rome wrote:

> I am drawing a density histogram, and want to label the plots with the
> mean using ltext(). But I need the x,y coordinates to feed into ltext,
> and I can't calculate them easily from my data. Is there a way to get
> the x and y ranges being used for the plot, so I can put the text at  
> the
> correct position in the panel.function?

No code .... so what a "density histogram" might be is still vague,  
but perhaps you are using density() and if so, have you looked at the  
"Value" section of that function's help page? (The same advice would  
apply were you using one of the (several) histogram functions.


More information about the R-help mailing list