Re: [matplotlib-devel] label= kwarg for imshow() and other scalarmappable plots

2013-03-25 Thread Damon McDougall
On Mon, Mar 25, 2013 at 2:03 AM, Eric Firing wrote: > On 2013/03/24 12:14 PM, Benjamin Root wrote: >> 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 ma

Re: [matplotlib-devel] label= kwarg for imshow() and other scalarmappable plots

2013-03-25 Thread Benjamin Root
On Mon, Mar 25, 2013 at 3:03 AM, Eric Firing wrote: > On 2013/03/24 12:14 PM, Benjamin Root wrote: > > 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 fo

Re: [matplotlib-devel] label= kwarg for imshow() and other scalarmappable plots

2013-03-25 Thread Phil Elson
In general I like the idea, but I'm not sure what behaviour I would expect in this case: plt.imshow(z, label='foobar') plt.imshow(z, label='wibble') plt.colorbar() I suppose it is an analogous problem to: plt.imshow(z, cmap='hot') plt.imshow(z, cmap='jet') plt.colorbar() Which produces a colorb

Re: [matplotlib-devel] label= kwarg for imshow() and other scalarmappable plots

2013-03-25 Thread Eric Firing
On 2013/03/24 12:14 PM, Benjamin Root wrote: > 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) typ

[matplotlib-devel] label= kwarg for imshow() and other scalarmappable plots

2013-03-24 Thread Benjamin Root
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(), th