[R] text in qqmath

Paul Murrell p.murrell at auckland.ac.nz
Thu Nov 29 20:41:38 CET 2001


Hi


> I can't seem to make qqmath plot text.
>
> v <- rnorm(8)
> qqmath(~v)  # this is ok, but
>
> qqmath(~v, panel=function(x, y) {
> points(x, y)
> text(0, 0, 'print me', cex=2)})
>
>  isn't ok.
>
> The axis frame is printed properly (ie, as in
> qqmath(~v)), but neither 'print me' nor the points
> show up on the graph.  I can, however, see the upper
> half of the word 'me' in the lower left corner of the
> graphics device.  So somehow things are being
> translated down and to the left; well 'print me' is
> anyway, but I don't see any points anywhere.
>
> Could someone please lend me a helpin hand?


That is because qqmath is a lattice function and lattice is built on top of
grid, which uses a different set of graphics commands.  Try using ltext()
and lpoints() or grid.text() and grid.points() and it should work ok.

Hope that helps

Paul


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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