Hi all, I'm trying to plot a colour bar for a scatter plot, and set the maximum value of the plot to something arbitrary. At the moment it always comes up as 255. How can I change this?
ax = plt.gca() pts = ax.scatter(coords[:,0], coords[:,1], c=np.linspace(0,1,n_pts), s=16, edgecolors='k', linewidth=1) Also, there seem to be many different ways to make colorbars associate with certain objects like the colorbar keyword to scatter perhaps, but the simplest/only way to create a colorbar that I can get to work is: ax.figure.colorbar(ax.images[0]) Is there a better way to do this so the vmin and vmax attributes of the scatter plot get used in the colorbar? Thanks, Angus. -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh ------------------------------------------------------------------------- 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 https://lists.sourceforge.net/lists/listinfo/matplotlib-users