Trying to get the referenced example from the mplot3d example web page working with Python 2.6.1 on Windows XP. Naturally, the line:
ax = fig.add_subplot(2, 1, 2, projection=‘3d’)
fails since ‘3d’ is not a recognized projection. Now, if I want to just plot the 3d, the solution that works seems to be:
fig = plt.figure()
ax = Axes3D(fig)
surf = ax.plot_surface()
However, I can’t seem to find a way to create the one figure, add the 2D subplot and then the 3D subplot.
Any suggestions?
Thanks in advance.
That was a feature added in matplotlib 1.0.0. You will need to upgrade your version of matplotlib to perform that example.
Ben Root
···
On Tue, Feb 22, 2011 at 3:31 PM, Patton Bradford <patbradford1@…872…> wrote:
Trying to get the referenced example from the mplot3d example web page working with Python 2.6.1 on Windows XP. Naturally, the line:
ax = fig.add_subplot(2, 1, 2, projection=‘3d’)
fails since ‘3d’ is not a recognized projection. Now, if I want to just plot the 3d, the solution that works seems to be:
fig = plt.figure()
ax = Axes3D(fig)
surf = ax.plot_surface()
However, I can’t seem to find a way to create the one figure, add the 2D subplot and then the 3D subplot.
Any suggestions?
Thanks in advance.