From: Benjamin R. <ben...@ou...> - 2013-03-24 22:14:59
|
So, for plot(), scatter() and other plotting functions, we can provide a label= kwarg so that a legend() can automatically populate the legend, making it extremely easy and convenient for making legends. But for image-based (scalar mappable) type plotting functions like imshow() and contourf(), the label kwarg doesn't do anything useful, but the colorbar() is sort of analogous to a legend(), but for scalar mappables. Does it make sense to others for the following to be equivalent: > plt.imshow(z) > cbar = plt.colorbar() > cbar.set_label('foobar') > plt.imshow(z, label='foobar') > plt.colorbar() I found that it is a small change to make this work, I just wanted to know if others think this makes sense before putting in the time to add documentation, modify examples and such. Cheers! Ben Root |