title: increasing 'x' and 'y' values expected
body: <p>I want to do a very simple 3D plot with this code:</p>
  
  <pre><code>x&lt;-c(1:10)
  y&lt;-c(10:1)
  z&lt;-cbind(x,y)
  
  persp(x,y,z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")
  </code></pre>
  
  <p>but I get this error:</p>
  
  <pre><code>Error in persp.default(x, y, z, theta = 30, phi = 30,  : 
    increasing 'x' and 'y' values expected
  </code></pre>
  
  <p>what should I do exactly to solve this problem?</p>
  
  <p><strong>UPDATE</strong>
  If I change my data. For example for x</p>
  
  <pre><code>test&lt;-c(0.4118836, 0.3481329, 0.3582897, 0.3122690, 0.3346040, 0.2409363, 0.2474494, 0.1744042, 0.1589965, 0.2435564)
  </code></pre>
  
  <p>and then</p>
  
  <pre><code>x&lt;-test
  y&lt;-c(1:10)
  z&lt;-matrix(x,nrow=length(x),ncol=length(y))
  persp(x,y,z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")
  </code></pre>
  
  <p>I am getting the same error</p>