title: plotting a 2d function as surface in 3d space with `Plots.jl`
body: <p>I have the following problem while plotting with <code>Plots.jl</code>. I like to plot the rosenbrock function</p>
  
  <pre><code>rosenbrock(x) = (1.0 - x[1])^2 + 100.0 * (x[2] - x[1]^2)^2
  </code></pre>
  
  <p>as surface, which expects a 2d <code>Tuple{Float64,Float64}</code> as input.</p>
  
  <p>What I could come up with, is the following:</p>
  
  <pre><code>using Plots
  gr()
  
  rosenbrock(x) = (1.0 - x[1])^2 + 100.0 * (x[2] - x[1]^2)^2
  
  ts = linspace(-1.0, 1.0, 100)
  x = ts
  y = map(rosenbrock, [(x, z) for (x,z) in zip(ts,ts)])
  z = map(rosenbrock, [(x, y) for (x,y) in zip(ts,ts)])
  # plot(x, x, z)
  plot(x, y, z, st = [:surface, :contourf])
  </code></pre>
  
  <p>which yields this plot:
  <a href="https://i.stack.imgur.com/BsM1o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BsM1o.png" alt="wrong rosenbrock surface"></a></p>
  
  <p>I think I messed up some dimensions, but I don't see what I got wrong.</p>
  
  <p>Do I have to nest the calculation of the mappings for <code>y</code> and <code>x</code> to get the result?</p>