Skip to content

2 Simple Lattice Plot Questions

4 messages · Elena Wilson, jimdare, Sundar Dorai-Raj

#
Have you tried specifying the levels of y's you want to display, e.g. ylim=c(0,5,10,15,20,30)?

 -----Original Message-----
From: 	r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]  On Behalf Of jimdare
Sent:	Wednesday, 11 March 2009 12:50 PM
To:	r-help at r-project.org
Subject:	Re: [R] 2 Simple Lattice Plot Questions


Thanks very much.    One other thing... see how the Y axis begins before 0. 
At first glance it appears that the 0's are actually worth something.  When
I use ylim=c(0,30) I get the graph I want, but the tick marks show only
5,10,15,20,25.  I want them to show 0,5,10,15,20,30.  Does anyone know how
to change this setting?

Cheers,
jimdare wrote:
-- 
View this message in context: http://www.nabble.com/2-Simple-Lattice-Plot-Questions-tp22445242p22447415.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
#
Yes, I have tried this.  Unfortunately it doesn't seem to work i.e. it still
shows 5,10,15,20,25.
Elena Wilson-2 wrote:

  
    
#
I don't believe Elena's suggestion will work. However, the following will:

xyplot(..., scales = list(y = list(at = seq(5, 25, 5))))

though you may need to extend the limits a little as well:

xyplot(..., ylim = lattice:::extend.limits(c(0, 30)))

and add the scales argument from the first example to place explicit
tick marks rather than let xyplot do so.

HTH,

--sundar
On Tue, Mar 10, 2009 at 7:04 PM, Elena Wilson <ewilson at dbmcons.com.au> wrote:
#
Excellent, thank you very much :)
Sundar Dorai-Raj-2 wrote: