[R] Little graph questions!
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Sun Feb 17 18:21:09 CET 2002
Uwe Ligges <ligges at statistik.uni-dortmund.de> writes:
> Paul Johnson wrote:
> >
> > 2. Background tint in png output varies in a way I can't understand.
> >
> > One time I set up a png device and ran the plot and saved it:
> >
> > http://lark.cc.ukans.edu/~pauljohn/R/ExampleCode/gamma4.png
> >
> > Another time I forgot to turn on the device, ran the plot, then used
> > dev.copy(png, file="poissonCLT",width=500,height=1000) to get:
> >
> > http://lark.cc.ukans.edu/~pauljohn/R/ExampleCode/poissonCLT.png
> >
> > in the poissonCLT.png, to my eye the background is light green, while in
> > the gamma4.png, it is white. DO you see it too?
>
>
> Works well for me (R-1.4.1, WinNT4; your version / OS?).
> You didn't specify a background color with par(bg=...) before?
I see it on Linux, although my R versions are slightly old on this
particular machine. I'll rebuild the development version and see if it
disappeared, but I don't think we touched this since 1.4.0?
>
> > 3. In all of these examples, I have had trouble positioning text in
> > figures. Because I don't know what the plotted values will be until the
> > model is run, it is hard to write coordinates for text(x,y,""). I
> > frequently wish there were a way to say "top left part of graph",
>
>
> You get those coordinates with
> par("usr")
>
>
> > but the best i can come up with is to find the coordinates of the max or min
> > values of x and y and put the text there.
> >
> > I have that code in the bottom of this one:
> >
> > http://lark.cc.ukans.edu/~pauljohn/R/ExampleCode/template_poisson4.r
> >
> > After using Axum for years, this seems a bit odd to me, but I'm willing
> > to do it, if that is what you really intend us to do.
Also, consider
plot(1)
mtext("Hello", adj=0.98, line=-1)
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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