Please help with 3d scatter plot

I have a function (shown below) that would take a 3D numpy array and plot points in 3D. I recently updated my matplotlib with the latest Enthought Python Distribution and now it doesn’t work; I guess matplotlib changed the api a little bit.

The first problem arises because there is no matplotlib.axes3d anymore. I can’t find the equivalent in the newest version. Can someone help me figure this out?

Thanks,

Jeremy

···

#===================

import matplotlib.pyplot as pyplot

import matplotlib.axes3d as p3

def PlotPoints§:

“”"

“”"

fig = pyplot.figure()

ax = p3.Axes3D(fig)

ax.plot3D(P[:,0],P[:,1],P[:,2],’.’)

pyplot.show()

return ax

Jeremy Conlin wrote:

I have a function (shown below) that would take a 3D numpy array and plot
points in 3D. I recently updated my matplotlib with the latest Enthought
Python Distribution and now it doesn't work; I guess matplotlib changed the
api a little bit.

The first problem arises because there is no matplotlib.axes3d anymore. I
can't find the equivalent in the newest version. Can someone help me figure
this out?

The axes3d support has been completely removed in matplotlib 0.98.x

···

Thanks,
Jeremy

#===================
import matplotlib.pyplot as pyplot
import matplotlib.axes3d as p3

def PlotPoints(P):
    """
    fig = pyplot.figure()
    ax = p3.Axes3D(fig)
    ax.plot3D(P[:,0],P[:,1],P[:,2],'.')
    pyplot.show()
    return ax

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options