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.
2. Is it possible to suppress plotting of all sides of the cube except
for the axes?
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.,
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
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
I'm working with a levelplot in which the x's are unequally spaced:
x = {.8,.85,.9,.91,.92,.93,.94,.95,.96,.97,.98,.99,1}
It seems this results in a "gap" in the plot in the vicinity of x =
8.75
to 8.85 or so. I assume this is because the rectangles are centered on
the points in the dataset, whereas the unequal space means that some need
to be "lopsided" for the levelplot to be gapless.
Is there any easy way to fix this problem?
Thanks,
Chris