On Mon, Sep 28, 2009 at 4:54 PM, Jeff Whitaker <js...@fa...> wrote:
> Ryan May wrote:
>>
>> Jeff,
>>
>> Right now, for me, any Basemap example that uses colorbar() is broken
>> for me. I think there's a problem with how Basemap sets the current
>> 'image' so that a colorbar can be automatically generated for plots.
>> The code currently does:
>>
>> plt.gci._current = ret
>>
>> I think the current image handling in matplotlib itself was reworked
>> (at least according to SVN logs, r7494), so that now instead there's a
>> setter function:
>>
>> plt.sci(ret)
>>
>> I'd be happy fix these myself if you're too busy.
>>
>> Ryan
>>
>>
>
> Ryan: I'm off to Australia for a conference tomorrow, so if you could fix
> that I'd be grateful. I wonder if we shouldn't wrap the old
> plt.gci._current = ret in a try/except, and use the new way if an Attribute
> Error is raised. That way, it will still work with old versions of
> matplotlib.
Trying both sounds like a good idea, since I just noticed this change
is only in SVN trunk, and not in the 0.99.x series (which is probably
why no one noticed). However, no attribute error is raised when
setting the attribute, it's just never used. I'll see if I can come
up with something similar that will work.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
|