Tried to post this last night, but it doesn't seem to have appeared.
Using R 2.0.1 on Windows XP + SP2.
I am traveling, away from my usual references. I'm trying to make a
4-dimensional plot: a levelplot with overlaid contours, with different
response variables represented by (1) colors on the levelplot and (2)
the contour lines.
First try was filled.contour + contour but the key printed by the first
means that the scales differ.
Then I tried levelplot. I couldn't figure out how to pass > 3 variables
to levelplot, so I duplicated all rows of the data frame and changed the
z data for the second half, in order to plot one half at a time.
Error in panel.levelplot(x[n1:n2], y[n1:n2], z[n1:n2], subscripts,
region = FALSE, :
NAs are not allowed in subscripted assignments
although that it completes when the second levelplot is set to
region=TRUE, contour=FALSE (though then the second plot then hides the
Hints or sample code will be most welcome. Once this works, the next
refinement will be to replace the colored levelplot with something
similar but with smooth edges produced by contouring, so advice on that
is also welcome.
Michael Prager, Ph.D.
NOAA Center for Coastal Fisheries & Habitat Research
Beaufort, North Carolina, USA