marcusantonius wrote: > I should perhaps mention, that if i try > cbar=fig.colorbar(p1,orientation='horizontal',ticks=[0.0,2.0,4.0,6.0,8.0])
The ticks that it uses are taken from the list--they are the ones that are within the range of numbers mapped to colors. The list of ticks does not set that range. > cbar.ax.set_xticklabels(['0', '2', '4','6','8']) Setting ticklabels is dangerous unless you do it based on first getting the actual ticks and using their values, or if you are otherwise sure of their values. But it should be very rare that you have to do this. > the colorbar is drawn correctly, but I get the label 0 at position 2, the > label 2 at position 4 and 4 at pos. 6, the labels at the end are not > drawn... None of the labels correspond to their ticks in this case. Eric ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users