[Matplotlib-users] clabel3D, is it possible?
dear all, I have plot a 3D picture, I would like to have xy projection with contours levels and labels. The contours works but I do not get the labels. This is my code: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d, Axes3D fig = plt.figure() ax = Axes3D(fig) #<-- Note the difference from your original code... X, Y, Z = axes3d.get_test_data(0.05) cset = ax.contour(X, Y, Z,100,zdir='z',offset=-100) ax.clabel(cset, fontsize=9, inline=1) plt.show()import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d, Axes3D #<-- Note the capitalization! fig = plt.figure() ax = Axes3D(fig) #<-- Note the difference from your original code... X, Y, Z = axes3d.get_test_data(0.05) cset = ax.contour(X, Y, Z,100,zdir='z',offset=-100) ax.clabel(cset, fontsize=9, inline=1) plt.show() Is it possible to have also the labels? Thanks Diego -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Colormap norm (vmin, vmax) based on visible part of figure
Hi all, I'm wondering if anyone knows how to compute colorbar limits (vmin, vmax) based only on the visible portion of the figure. My use-case is a pcolormesh(x, y, z) drawn over a Basemap instance. The coordinates x and y cover the entire globe, but I'm only mapping the Arctic. What happens is that the normalization is done over the entire z array, while only a subset of z actually appears on the map. The colors appearing on the map thus cover only a small fraction of the entire color range. >From what I managed to understand, pcolormesh creates a collections of patches colorcoded based on the array attribute. So my question is if there is a builtin way to know which items of this collections are clipped so I can mask this part of the array ? Thanks a lot, David -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users