SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] matplotlib 1.0.1rc available for testing, building

From: Benjamin R. <ben...@ou...> - 2011年01月05日 17:42:14
On Wed, Jan 5, 2011 at 11:11 AM, Benjamin Root <ben...@ou...> wrote:
> On Wed, Jan 5, 2011 at 10:33 AM, Benjamin Root <ben...@ou...> wrote:
>
>> On Wed, Jan 5, 2011 at 10:08 AM, Christoph Gohlke <cg...@uc...>wrote:
>>
>>> Not sure if this should hold the release but 1.0.1rc fails to run two
>>> examples (contourf_log.py and pcolor_log.py) as described in bug
>>> #3143748 "Math domain error in ticker.py is_decade()"
>>> <
>>> http://sourceforge.net/tracker/?func=detail&aid=3143748&group_id=80706&atid=560720
>>> >
>>>
>>> Christoph
>>>
>>> On 1/5/2011 5:36 AM, John Hunter wrote:
>>> > OK, I'm not aware of any outstanding issues that should hold this
>>> > release. If there are any, please let me know, else I'll upload the
>>> > final later today.
>>> >
>>> > On Wed, Jan 5, 2011 at 7:33 AM, Michiel de Hoon <mjl...@ya...
>>> > <mailto:mjl...@ya...>> wrote:
>>> >
>>> > Done.
>>> >
>>> > Thanks,
>>> > --Michiel.
>>> >
>>> >
>>>
>>>
>> The fix that was applied to the development branch should have also been
>> applied to the maintenance branch as well, but it appears that it wasn't.
>> The fix given in r8873 is correct, though. Adding the np.abs() fixes the
>> domain error. Taking the lx calculation out would mess things up for those
>> who are using various offsets for their plots.
>>
>> Although, looking at the code closer, I have to wonder if it is still
>> correct because of the "nearest_long()" function. Doesn't python already
>> have established rounding functions that should be used for these things?
>>
>> Anyway, I don't know why the tickers for the colorbars are wrong... the
>> contourf_log.py code uses locator=ticker.LogLocator() and the pcolor_log.py
>> code uses norm=LogNorm(). These are two different approaches, and the tick
>> labels are still wrong. Does anybody else have any insight on this?
>>
>> Ben Root
>>
>>
> Interesting... if I use format=ticker.LogFormatter(labelOnlyBase=False) in
> the call to colorbar, it works as expected. Even more interesting, if I use
> format=ticker.LogFormatterMathtext() or
> format=ticker.LogFormatterExponent(), it also works as expected (even though
> labelOnlyBase=True for those two...).
>
> btw, I would be nice if LogFormatterMathtext() was used instead of
> LogFormatter() for the default for colorbar. It appears that this is the
> case for regular plots, so I don't know why the same doesn't happen for
> colorbars (but that's for another day...).
>
> Ben Root
>
>
It appears that in the call for LogFormatter(), it calls is_decade(), while
LogFormatterExponent() and LogFormatterMathtext() are using
is_close_to_int() instead of is_decade(). Should LogFormatter() be changed
to use is_close_to_int() or was the use of is_close_to_int() a temporary
workaround with some issue in is_decade()?
Ben Root

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /