[R] Wireframe (lattice) questions
Deepayan Sarkar
deepayan at stat.wisc.edu
Mon Feb 10 01:04:05 CET 2003
On Sunday 09 February 2003 05:19 pm, Christopher Adolph wrote:
> I have a few questions on formatting wireframe plots:
>
> 1. How can I remove (or at least "white-out") the border on the plot?
> (I.e., the 2-d box around the whole plotting area, not the 3-d cube). I'm
> willing to hack the code if necessary.
You would have to change print.trellis. Find the part that looks like
pargs <- c(x$panel.args[[panel.number]],
x$panel.args.common)
if (!("..." %in% names(formals(panel))))
pargs <- pargs[names(formals(panel))]
do.call("panel", pargs)
grid.rect()
and comment out the grid.rect() part.
> 2. Is it possible to suppress plotting of all sides of the cube except
> for the axes?
No, not currently.
> 3. Is there a reliable way to print expressions in wireframe plots? I'm
> using the same code I use for other plots, but can't seem to get Greek
> letters in the plots. E.g.,
This is definitely a bug in lattice. For now, you could work around it with
xlabstr <- list(expression(rho))
> xlabstr <- expression(rho);
>
> ....
>
> print(wireframe(z ~ p1 * p2,
> data=data,
> zoom=zoom,
> drape = drape,
> perspective = perspective,
> colorkey = colorkey,
> xlab=xlabstr,
> ylab=ylabstr,
> zlab=zlabstr,
> scales = scales,
> distance= distance,
> screen = screen,
> aspect = aspect,
> scpos = scpos,
> shade = shade,
> shade.colors = function(cosangle, height)
> palette.shade(cosangle, height = .5, saturation =
> .05),
> light.source = c(0, 0, 1),
> panel.3d.wire=panel.custom
> ));
>
> Thanks in advance,
>
> Chris
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list