On Feb 23, 2011, at 5:47 AM, Michael Bach wrote:
> Hello Everyone,
>
> I am using R ver. 2.10.1 (2009-12-14). I installed lattice today via
> install.packages.
>
> I am doing this minimal example:
>
> M = read.csv("/path/to/csv")
> cloud(x ~ y * z, data = M)
>
> this correctly gives me a scatterplot of the csv data which has 3
> columns. Every column contains 1800 numeric 0 < values < 1300
> when I want to plot the corresponding wireframe via
> wireframe(x ~ y * z, data = M)
>
> The box and axes are set up correctly, only the actual plot content
> is missing. Wireframe returns without error.
>
> Any hints on how I could debug this? Or am I doing something wrong /
> addtitional config needed?
wireframe expects the LHS of the formula to have "x" points at each of
the possible (y,z) points which exist on an ordered grid. cloud does
not. cloud can plot anything that is offered with a set of (x,y,z)
points I can get a perfectly sensible result from:
M <- data.frame(x=runif(100), y=runif(100))
M$z= with(M, x+y+0.5*runif(100))
cloud(x ~ y * z, data = M)
But wireframe will not plot that. (Nor does it report an error.) This
should succeed:
> M <- expand.grid(x=1:10, y=1:10)
> M$z= with(M, x+y+runif(100))
> wireframe(z ~ x*y, data = M) # a slightly "rumpled" plane
You have not offered either the data, nor str() on the data, but I
suspect you do not have point values observed on a grid.
--
David Winsemius, MD
West Hartford, CT