[R] persp or wireframe 3D plot: how can I independently adjust linewidth of the 'surface' and framebox?

Duncan Murdoch murdoch at stats.uwo.ca
Mon May 8 21:35:36 CEST 2006


On 5/8/2006 3:02 PM, Matthew Sundling wrote:
> It is a trivial matter to adjust the linewidth of the axes and plot  
> line in a 2D plot:
> 
> x <- 1:10;
> y <- 1:10;
> par(lwd=2); # axis (and others) linewidth
> plot(x,y,"l",lwd=6); # plot linewidth
> 
> Is there anything comparable to this for persp or wireframe?  I've  
> tried a number of ways, and the framebox/axes seem to be linked to  
> the linewidth used in generating the 'wires' of a persp or wireframe  
> 3D plot.
> 
> Also, how can I adjust the font size used in a persp/wireframe?   
> Again, axis labels font size don't seem to respond to par(cex.lab=3).

I think the current version of persp doesn't allow the fine level of 
control you're looking for.  The source for it is mostly C code in 
src/main/plot3d.c; it doesn't look (to me) to be easy to add what you're 
looking for.

Not sure about wireframe, but I would guess it has similar restrictions.

Duncan Murdoch




More information about the R-help mailing list