[R] contour in lattice

Deepayan Sarkar deepayansarkar at yahoo.com
Fri Oct 11 19:23:07 CEST 2002


Hi,

the problem is due to the fact that your data frame doesn't have z-values for
all possible x-y combinations (equivalent to a matrix in contour with lots of
NA's), which contourplot can't handle. This is definitely a bug in contourplot,
and I will try to look into it. 

Deepayan

--- Ernesto Jardim <ernesto at ipimar.pt> wrote:
> Hi
> 
> I'm using lattice 0.5-6 and R 1.6.0 in a SuSE 8.0 linux box.
> 
> The volcano dataset is a matrix with x and y has margins and z has the
> values.
> 
> I'm using a data.frame with 4 columns (x, y, z, year) and I'm using a
> z~x*y|year formula. 
> 
> The image result is ok but the contour is not ...
> 
> Looking at documentation I understand that I the way I'm doing it is
> correct.
> 
> I've uploaded two files, the dump of my dataset and a pdf with the
> result I'm getting with:
> 
> levelplot(Zest~x*y, data=recs2001, contour=TRUE)
> 
> in my web page (http://ej.freezope.org/R)  
> 
> If you can please take a look.
> 
> Regards
> 
> EJ
> 
> On Fri, 2002-10-11 at 07:47, Deepayan Sarkar wrote:
> > 
> > --- Ernesto Jardim <ernesto at ipimar.pt> wrote:
> > > Hi
> > > 
> > > I'm using lattice's function levelplot but when I choose the flag
> > > contour =TRUE I get very strange results. It looks like the contour
> > > lines have nothing to do with the "image" plot under ...
> > 
> > What version of lattice do you have ? Could you give an example ? e.g., 
> > 
> > > data(volcano)
> > > levelplot(volcano, contour = TRUE)
> > 
> > looks OK to me.
> > 
> > Deepayan


__________________________________________________

Faith Hill - Exclusive Performances, Videos & More

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list