Skip to content

Partial wireframe plots

2 messages · Rob Knell, Brian Ripley

#
Dear R-helpers

Can anyone direct me to a method for plotting what you might call a 
partial wireframe plot? I have two explanatory variables in a dataset 
which give me a significant interaction term when I fit a model. The 
two variables are correlated with each other to a moderate degree, and 
if I plot the predicted values from the model as a surface in a 3D 
wireframe plot there are some quite large parts of the surface that 
don't actually represent reasonable values for both variables. I'd like 
to only plot the parts of the surface that correspond to values of X 
and Y that are present in my dataset, which would give a surface with 
some corners missing. I can't see any way of specifying parts of the 
grid that should not be drawn: can anyone enlighten me? Alternatively, 
is it possible to shade specified squares of the plot to indicate the 
important parts of it?

Thanks for any help

Rob Knell

School of Biological Sciences
Queen Mary, University of London
#
On Mon, 10 Jan 2005, Rob Knell wrote:

            
Note what ?persp says about NA values: I believe wireframe (lattice) does 
the same thing, that is only plot the grid over the region of finite 
(non-NA, non-Inf) values, at least provided it is a sensible shape.