[R] grid: clipping points to viewport?
p.murrell at auckland.ac.nz
Mon Feb 17 21:28:18 CET 2003
> Why command
> does not clip points (point (1.1,1.1) is still visible), although there
> is no problem with grid.lines(...)?
What version/device is this happening on?
This works for me (R 1.6.2, X11/postscript)
> And one more question - how can I swap direction of tick marks on
> grid.x(y)axis to turn it inside plot?
If I understand what you mean, there is no argument to grid.x(y)axis
that will do what you want. This is something that should probably be
added at some piont. For now, it is pretty straightforward to do
something by hand. The following may help ...
x <- rnorm(10)
y <- rnorm(10)
tick.loc <- grid.pretty(range(x))
grid.lines(unit(range(tick.loc), "native"), 0)
grid.text(tick.loc, unit(tick.loc, "native"),
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
64 9 3737599 x85392
paul at stat.auckland.ac.nz
More information about the R-help