[R] 'levelplot' with an option 'at'

Martina Pavlicova pavlicov at stat.ohio-state.edu
Tue Oct 28 21:13:49 CET 2003


Hi again,

since the attached plots did not go through, I created a quick web-page,
where all the plots are posted. Here it is:

http://www.stat.ohio-state.edu/~pavlicov/levelplot/

Thanks again.

Martina Pavlicova
--------------------------------------------------------------------------
Department of Statistics             Office Phone: (614) 292-1567
1958 Neil Avenue, 304E Cockins Hall  FAX: (614) 292-2096
The Ohio State University            E-mail: pavlicov at stat.ohio-state.edu
Columbus, OH 43210-1247              www.stat.ohio-state.edu/~pavlicov


On Tue, 28 Oct 2003, Martina Pavlicova wrote:

>
> Hi all,
> I encountered a difference between versions 1.6.1 and 1.7.0 when using
> levelplot with an option 'at'. Here are the specs of the two platforms
> used:
>
> > R.version
>          _
> platform sparc-sun-solaris2.8
> arch     sparc
> os       solaris2.8
> system   sparc, solaris2.8
> status
> major    1
> minor    6.1
> year     2002
> month    11
> day      01
> language R
>
> > R.version
>          _
> platform i686-pc-linux-gnu
> arch     i686
> os       linux-gnu
> system   i686, linux-gnu
> status
> major    1
> minor    7.0
> year     2003
> month    04
> day      16
> language R
>
>
> I created an easy example of two levelplots (one without an option 'at'
> and one with an option 'at') which I run through version 1.6.1. The plot
> are called:
>         version161.without_at.jpg
>         version161.with_at.jpg
>
> After update to version 1.7.0, I run the same two plots and I got the
> following files:
>         version170.without_at.jpg
>         version170.with_at.jpg
> When I don't include the option 'at' into a levelplot, the plots
> version161.without_at.jpg and version170.without_at.jpg are similar
> (differ only in labels for contours). BUT if I include the option 'at',
> version 1.7.0 produces very different picture which I believe is wrong
> (compare files version161.with_at.jpg and version170.with_at.jpg). WHY is
> that? Am I missing something?
>
> I have attached all 4 plots and also the commands I used to create the
> small example.
>
> Thank you for all your help.
>
> Martina Pavlicova
>
> ---------------------------------------------------------------------
> library(lattice)
>
> x <- row(matrix(NA,11,11))-6
> y <- col(matrix(NA,11,11))-6
> z <- x*y
>
> jpeg("version161.without_at.jpg")
> foo <- levelplot(z~x*y,contour=T, cuts=5,
>                  ##at=c(-10,-5,0,5,10),
>                  panel=function(x,y,...){
>                    panel.levelplot(x,y,  ...)
>                  })
> print(foo)
> dev.off()
>
> jpeg("version161.with_at.jpg")
> foo <- levelplot(z~x*y,contour=T, cuts=5,
>                  at=c(-10,-5,0,5,10),
>                  panel=function(x,y,...){
>                    panel.levelplot(x,y,  ...)
>                  })
> print(foo)
> dev.off()
>
>
>
> --------------------------------------------------------------------------
> Department of Statistics             Office Phone: (614) 292-1567
> 1958 Neil Avenue, 304E Cockins Hall  FAX: (614) 292-2096
> The Ohio State University            E-mail: pavlicov at stat.ohio-state.edu
> Columbus, OH 43210-1247              www.stat.ohio-state.edu/~pavlicov
>




More information about the R-help mailing list