Python Pyplot won't plot surface fully
<p>In the attached picture you can see two plots of the same data. The left one is plotted with <code>plot_wireframe()</code> the right one with <code>plot_surface()</code></p>

<p>Like this:</p>

<pre><code>fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(xm, ym, Values)

fig2 = plt.figure()
ax2 = fig2.add_subplot(111, projection='3d')
ax2.plot_wireframe(xm, ym, Values)

plt.show()
</code></pre>

<p>Why is this? The <code>plot_wireframe</code> is correct. Why is for example the peak in the left upper corner not shown on the surface plot? Thanks</p>

<p><a href="http://i.stack.imgur.com/jH4Du.png" rel="nofollow"><img src="http://i.stack.imgur.com/jH4Du.png" alt="the two plots of the same data"></a></p>

<p>Here, another example with the data matrix:</p>

<p><a href="http://i.stack.imgur.com/PZIJS.png" rel="nofollow"><img src="http://i.stack.imgur.com/PZIJS.png" alt="enter image description here"></a></p>

<p>Given what the discussion in the comments, I <em>think</em> what's going on is you have a normal wireframe that looks as it should, but the surface plot is a 2D projection in that 3D axes object. I noticed that you are missing a line that shows up in <a href="http://matplotlib.org/examples/mplot3d/surface3d_demo.html" rel="nofollow">the matplotlib surface example</a>: <code>X, Y = np.meshgrid(X, Y)</code>. Assuming I'm on the right track, you need to insert an analogous statement prior to the <code>axes.plot_surface()</code> call.</p>

python matplotlib