[R] surface plots using wireframe, color at high res, grid at low res?

Duncan Mackay mackay at northnet.com.au
Sun Jul 7 00:04:18 CEST 2013

Hi Patrick

You should do better by using a specific graphic device and then send 
the file to the printer


trellis.device(device = postscript,
                file = "copula1.ps",
                title = "",
                colormodel = "srgb")

wireframe(shareframe$z.dir~ shareframe$u1.dir*shareframe$u2.dir,
   scales = list(arrows=FALSE,col=1),
   drape = c(TRUE),
   colorkey = FALSE,
   paper = "special",
   horizontal = "FALSE",
   height = 18,
   width =18,
   screen = list(z = 195,y=180, x = 105),
   col.regions = census.color.function((1:10000-.5)/10000),
   xlab = expression(U[1]), ylab = expression(U[2]), zlab="Density",main=" "


see ?trellis.device and ?Devices

You will have to modify the arguments to suit the graph and your device.
If you use a device like png use a high resolution value



Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mackay at northnet.com.au

At 07:55 6/07/2013, you wrote:
>I'm working on some simple copula plots for a poster presentation, 
>and by simple I mean simple, gaussian, etc., etc., etc.
>I know I might be taking this a bit too far but I'm trying to see if 
>I can overlay one surface plot over another.  I want to use color 
>but I like the addition of a black wireframe to hold together a 
>better sense of shape.
>Right now, I have it set up to create a 300x300 colored surface 
>using col="transparent", and I'd like to add a n x n (10, 20, 
>whatever) on top of this.  Right now I'm using wireframe and I'm 
>using my employer's official colors for gradient coloring.  My code 
>is below.  I apologize for the code length but it does execute the 
>way I want from a new session.
>I'm also curious as to why I'm some grid effects or lighting effects 
>(unsure of which) that I'm using on my personal 3.0.1 copy on 
>Mountain Lion OSX, that I wasn't getting on 2.14.1 on Windows XP... 
>something to figure out for another time.  This is a much more 
>secondary concern for which I have a solution (compile the final 
>graphic at work).  For now I'm just trying to see if its possible to 
>lay a smaller resolution grid over the colored high resolution grid.
>I will say that other help documents have been very useful to get 
>the code along to this point.
>Patrick Joyce
>Work e-mail:  patrick.m.joyce at census.gov
>wireframe(shareframe$z.dir~ shareframe$u1.dir*shareframe$u2.dir,
>   xlab = expression(U[1]), ylab = expression(U[2]), zlab="Density",main=" ",
>scales = list(arrows=FALSE,col=1),
>   drape = c(TRUE),
>   screen = list(z = 195,y=180, x = 105),col.regions = 
> census.color.function((1:10000-.5)/10000))
>         [[alternative HTML version deleted]]
>R-help at r-project.org mailing list
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list