[R] persp fail with non-equidistant dates

Tomas Bayer tbr at ig.cas.cz
Mon Aug 22 17:17:10 CEST 2016


Hello,
when I plotted non-equidistant data in 3D (using persp and contour), it
was ended with the same error message:

> persp(y, x, z, xlab="latitude", ylab="longitude", zlab="altiude",
main="Altitude")
Error in persp.default(y, x, z, xlab = "latitude", ylab = "longitude",  :
  increasing 'x' and 'y' values expected

How to fix it? The original data are in columns

 50.84925    14.65715 614.0  48909.14   -62.49  99  48929  5  122306
 50.84919    14.65702 617.0  48816.32  -145.82  69  48836  6  122331
 50.84908    14.65681 622.0  49113.40     6.64  99  49133  4  122442

Tomas Bayer
  ,           ,
 /             \
((__-^^-,-^^-__))
 `-_---' `---_-'
  `--|o` 'o|--'
     \  `  /
      ): :(
      :o_o:
       "-"
GNU's Not Unix!



More information about the R-help mailing list