Re: [R] Set length of axes in lattice

2008-02-17 Thread Saptarshi Guha
Thank you.
On Feb 17, 2008, at 1:18 PM, Deepayan Sarkar wrote:
> See ?print.trellis.
>
> p <- xyplot(1 ~ 1, aspect = 0.5)
> p
> plot(p, panel.width = list(2, "inches"), panel.height = list(1,  
> "inches"))
>
> This overrides 'aspect=' though, that is, you will need to specify
> both width and height if you want to control the aspect ratio.
>
> -Deepayan

__
R-help@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.


Re: [R] Set length of axes in lattice

2008-02-17 Thread Deepayan Sarkar
On 2/17/08, Saptarshi Guha <[EMAIL PROTECTED]> wrote:
> Hello,
> It is possible to set the aspect ratio  of the Y-axis to the X-axis
> in xyplot
> (a) xyplot(y~x,aspect=1.8)
> Suppose I have only 1 panel and i wish to set the length of the X-
> axis to 2" keeping the same aspect ratio as in (a). I would also like
> to keep the same scales.
> I suppose i need to do something in prepanel but what?
> Is there any function i can call to set the actual length of the axes?

See ?print.trellis.

p <- xyplot(1 ~ 1, aspect = 0.5)
p
plot(p, panel.width = list(2, "inches"), panel.height = list(1, "inches"))

This overrides 'aspect=' though, that is, you will need to specify
both width and height if you want to control the aspect ratio.

-Deepayan

__
R-help@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.


[R] Set length of axes in lattice

2008-02-17 Thread Saptarshi Guha
Hello,
It is possible to set the aspect ratio  of the Y-axis to the X-axis  
in xyplot
(a) xyplot(y~x,aspect=1.8)
Suppose I have only 1 panel and i wish to set the length of the X- 
axis to 2" keeping the same aspect ratio as in (a). I would also like  
to keep the same scales.
I suppose i need to do something in prepanel but what?
Is there any function i can call to set the actual length of the axes?
Thank you
Saptarsho

Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha


[[alternative HTML version deleted]]

__
R-help@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.