Re: [R] plot problem

From: Daniil Ivanov <daniil.ivanov_at_gmail.com>
Date: Mon 21 Aug 2006 - 17:16:07 EST

Hi,

 thank you very much for your help.
 In examples of gstat manual it was no
 print(). I thought it is like in Matlab, you take  an example from the manual and it works.  Silly me ;)

Thanks, Daniil.

On 8/21/06, Roger Bivand <Roger.Bivand@nhh.no> wrote:
> On Mon, 21 Aug 2006, Daniil Ivanov wrote:
>
> > Ok, what is wrong with a following code:
> >
> > # remove all the present objects
> > rm(list = ls())
> >
> > # load the libraries we need
> > library(gstat)
> >
> > data(meuse)
> > vgm1 <- variogram(log(zinc)~1, ~x+y, meuse)
> > plot(vgm1)
> > dev.copy2eps(file="fig2.eps",horizontal=T)
> > dev.off()
> >
> > it plots nothing
> > but from the R console
>
> gstat:::plot.gstatVariogram uses xyplot, a lattice graphics method, to
> make it easy to plot directional variograms. So please put print() round
> the plot(), see FAQ 7.22.
>
> >
> > plot(vgm1)
> >
> > gives me a plot.
> >
> > Thanks, Daniil.
> >
> > On 8/21/06, Daniil Ivanov <daniil.ivanov@gmail.com> wrote:
> > > Hi,
> > >
> > > Ok, thanks to all.
> > > Problem was with class of variogram
> > >
> > > > class(vgm1)
> > > [1] "gstatVariogram" "data.frame"
> > >
> > > If I fix it manually to
> > >
> > > class(vgm1) <- "gstatVariogram"
> > >
> > > everything runs as it should.
> > >
> > > Thanks, Daniil.
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch 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.
> >
>
> --
> Roger Bivand
> Economic Geography Section, Department of Economics, Norwegian School of
> Economics and Business Administration, Helleveien 30, N-5045 Bergen,
> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand@nhh.no
>
>



R-help@stat.math.ethz.ch 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. Received on Mon Aug 21 17:25:32 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 21 Aug 2006 - 18:23:18 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.