Skip to content
Prev 363471 / 398502 Next

persp fail with non-equidistant dates

On 22/08/2016 11:17 AM, Tomas Bayer wrote:
You haven't shown us what is in y, x and z, but it looks as though you 
haven't got data in the form required by persp, i.e. a vector of 
increasing values in each of the first two arguments, and a matrix of 
values in the third.  Using your variable names, you'd want z[i,j] to 
correspond to y[i] and x[j].

If you just have a collection of (y, x, z) triples, you'll need to do 
some pre-processing to fit a surface and produce the required inputs.

Duncan Murdoch