John Hunter wrote:
> On Mon, Feb 22, 2010 at 4:33 PM, John Hunter <jdh2...@gmail.com> wrote:
>>  polycol = plt.hexbin(data['jetMomentum'][cut] / 1000,
>> data['deltaR'][cut],gridsize=50, norm=colors.LogNorm())
>>  cb = plt.colorbar(norm=colors.LogNorm())
>>
>> but this appears to be broken:
> 
> I committed some changes to support this -- the following now works:
> 
>   polycol = plt.hexbin(data['jetMomentum'][cut] / 1000,
> data['deltaR'][cut],gridsize=50, norm=colors.LogNorm())
> 
>   cb = plt.colorbar(norm=polycol.norm)
> 
> Eric - I was surprised the colorbar does not use the mappable norm by
> default (if passed norm=None).  Instead it uses ::
> 
>   norm = colors.Normalize()
> 
> is this a feature?

Yes.  You are looking at ColorbarBase, which does not have an associated 
mappable.  The derived Colorbar class does grab the cmap and norm from 
the mappable used in the initialization.  Is this somehow not working? 
Did you really need to specify the norm explicitly?

Eric
> 
> JDH


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to