[R] Lattice Plot formatting problem/s
ehlers at ucalgary.ca
Wed Jan 6 17:11:48 CET 2010
> I am having difficulty getting the right format for a lattice plot I am
> trying to produce.
> Here is a pic of the plot as I get it now
> and here is the code I am using:
> DATA<-RN[is.element(RN$age,0:3),] #select data on age
> I have a number of problems:
> 1. the Z-axis label goes off the edge of the plotting area, I need to move
> the plot to the right somehow, but can't find a way to do this (tried
> various margin settings)
Or rotate the z-label; see below.
> 2. I would like the Z scale to read from 0 to 1.0 with intervals of 0.2, at
> the moment there is no 0 or 1.0 on the scale
Use the 'scales' argument; see below.
> 3. I would like the X-axis tick marks to just be 0, 1, 2 & 3. At the moment
> they go up in 0.5 intervals rather than 1.0
Use the 'scales' argument;
You don't provide reproducible code, so here's an example
from ?wireframe; it should give you the idea:
wireframe(volcano, shade = FALSE,
zlim=c(100,200), ##modify the z-axis limits
zlab=list("long_z_label", rot=90), ##print z-label parallel
z=list(at=c(100,150,200)), ##where to put ticks and labels
> I have been searching round for ages for info on these problems, so I hope
> some kind person can help.
University of Calgary
More information about the R-help