[GRASSLIST:10734] Re: cannot put text in graphics in R

Roger Bivand Roger.Bivand at nhh.no
Sat Mar 4 12:19:23 EST 2006


On Sat, 4 Mar 2006, Carlos "Guâno" Grohmann wrote:

> Hello all,
> I am trying to make some postscript graphics of some variograms in R,
> but I can't.
> Last time I did this kind of thing was prior to R version 2.. did
> something changed since then?
> 
> this is what I am doing:
> 
> >postscript(file="variogram.ps", horizontal=F,
> onefile=F,height=5,width=5, pointsize=10)
> > plot(variog1, model=vrg.eye2 , main="", xlab="Distance (m)", ylab="Semivariance", col="black")

What class is variog1, which function made it, and from which package? 

plot() is a generic method, and dispatches on the class of its first 
argument, so some changes have happened here - it turned out that three 
different packages defined class variogram with different contents. We've 
been trying to separate these, so that the wrong methods are not called.

> 
> so far, so good, but when I try tu add text..
> 
> > text(3500,7600,"Range: 2650m"); Error in text.default(3500, 7600, "Range: 2650m") :
>         plot.new has not been called yet
> >
> 
> 
> tks
> 
> Carlos
> --
> +-----------------------------------------------------------+
>               Carlos Henrique Grohmann - Guano
>   Geologist M.Sc  - Doctorate Student at IGc-USP - Brazil
> Linux User #89721  - carlos dot grohmann at gmail dot com
> +-----------------------------------------------------------+
> _________________
> "Good morning, doctors. I have taken the liberty of removing Windows
> 95 from my hard drive."
> --The winning entry in a "What were HAL's first words" contest judged
> by 2001: A SPACE ODYSSEY creator Arthur C. Clarke
> 

-- 
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 at nhh.no




More information about the grass-user mailing list