# [R] 2 Simple Lattice Plot Questions

Sundar Dorai-Raj sdorairaj at gmail.com
Wed Mar 11 03:17:51 CET 2009

```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:
> 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:
>>
>> Hi,
>>
>> I have created the plot below and have a few questions about changes.
>>
>> 1) How do I change the "Year" title of each plot so it reads from the top
>> "2006","2007","2008","2009".
>> 2) How do I get rid of those vertical grey bars in the title bar of each
>> plot?
>>
>> I apologise for my ignorance... one of those days :(
>>
>> James
>>
>>
>>  http://www.nabble.com/file/p22445242/PLOT.jpg
>>
>
> --
> 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
> and provide commented, minimal, self-contained, reproducible code.
> --
> Message  protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
> http://www.mailguard.com.au/mg
>
>