Re: [Matplotlib-users] plotting a series of 3D points and picker=True and 3D From: Neil Crighton - 2008-01-27 22:18:04 ```I think scatter3D does what you want: from matplotlib import axes3d import pylab as pl fig = pl.figure() ax = axes3d.Axes3D(fig) ax.scatter3D(data[:,0],data[:,1],data[:,2]) ax.set_xlabel('X value') ax.set_ylabel('Y value') ax.set_zlabel('Z value') pl.show() You could also change the colour and size of each point based on other array values: col = ax.scatter3D(data[:,0], data[:,1], data[:,2], c=data[:,3], cmap=pl.cm.jet, s=data[:,4]) cbar = fig.colorbar(col,shrink=0.9,extend='both') cbar.ax.set_ylabel('axis 3 data values') Pretty nifty. Neil > hello, > I would like to plot in 3D a dataset organized as 1000 x,y,z points in a > numpy array, so it would be smthg like > plot3d(data[:,0],data[:,1],data[:,2]). I looked at the plot3D cookbook > page, but it all seems to expect some sort of binning on a grid..... > > best, > Johann > ```
 Re: [Matplotlib-users] plotting a series of 3D points and picker=True and 3D From: Neil Crighton - 2008-01-27 22:18:04 ```I think scatter3D does what you want: from matplotlib import axes3d import pylab as pl fig = pl.figure() ax = axes3d.Axes3D(fig) ax.scatter3D(data[:,0],data[:,1],data[:,2]) ax.set_xlabel('X value') ax.set_ylabel('Y value') ax.set_zlabel('Z value') pl.show() You could also change the colour and size of each point based on other array values: col = ax.scatter3D(data[:,0], data[:,1], data[:,2], c=data[:,3], cmap=pl.cm.jet, s=data[:,4]) cbar = fig.colorbar(col,shrink=0.9,extend='both') cbar.ax.set_ylabel('axis 3 data values') Pretty nifty. Neil > hello, > I would like to plot in 3D a dataset organized as 1000 x,y,z points in a > numpy array, so it would be smthg like > plot3d(data[:,0],data[:,1],data[:,2]). I looked at the plot3D cookbook > page, but it all seems to expect some sort of binning on a grid..... > > best, > Johann > ```