On Oct 9, 2008, at 7:08 AM, Ryan May wrote:

> Zane Selvans wrote:
>> Zane Selvans <[EMAIL PROTECTED]> writes:
>>
>>> I also need to create a
>>> colorbar to act as a legend, describing what the colors of the lines
>>> means, in terms of values associated with that attribute.
>>
>> I've found the matplotlib.colorbar.ColorbarBase class...
>> I want them to go from, for instance, 0-180
>> (degrees) in 20 or 30 degree intervals.  It seemed like setting the  
>> keyword
>> arguments in ColorbarBase(boundaries=[0,180]) or  
>> values=linspace(0,180,10) or
>> something like that ought to have done the right thing... but no,  
>> and I don't
>> see any documentation on how these keywords are supposed to be  
>> used, in the
>> docstring or elsewhere... anyone know how they work?
>
> You need to pass an instance of a matplotlib.colors.Normalize to the
> constructure to ColorbarBase, as in:
>
> cbar = ColorbarBase(norm=Normalize(0, 180))

Ahhh.  There we go.

> As far as colormapping lines, you can do this using a LineCollection  
> object.

Hmm.  I'll have a look at these.  Jeff Whitaker suggested them for  
something else too. I too often feel like I'm just hacking my way  
around in Matplotlib, without understanding how it is actually  
"supposed" to be used (i.e. how it was designed to work).  Is there an  
architectural overview floating around somewhere that I'm not aware of?

Thanks for the help!
Zane

--
Zane Selvans
Amateur Earthling
[EMAIL PROTECTED]
303/815-6866
http://zaneselvans.org
PGP Key: 55E0815F







-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to