On 08/18/2011 10:03 PM, Richard Neher wrote:
> Hi folks,
>
> it seems to me that there is a bug in scatter when using log scale. Have
> a look at the output of the following script:
>
> frompylab import*
>
> print matplotlib.__version__
> x=arange(10)
> plot(x, exp(-x))
> ax=gca()
> ax.set_yscale('log')
>
> scatter(x, exp(-x), label= 'works fine')
> scatter(x, zeros(10), marker='x', label='shows up at 0.1, rather than 0')
> legend()
> savefig('scatter_bug.png')
>
>
> On my machine, scatter puts zeros on the logscale somewhere at 0.1,
> where they aren't supposed to be.

I agree that this is a bug.  (I suspect it is a malign side-effect of 
some attempt to make bar plots work with a log scale, but I haven't 
tracked it down.) What is less clear is the desired behavior.  Raise an 
exception? Silently delete the points that are invalid with a log scale? 
Or delete them with a warning?

Eric

>
> thanks a lot,
> richard
>
> The verbose output:
>
> $HOME=/Users/richard
> CONFIGDIR=/Users/richard/.matplotlib
> matplotlib data path
> /Library/Frameworks/EPD64.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/mpl-data
> loaded rc file
> /Library/Frameworks/EPD64.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc
> matplotlib version 1.0.1
> verbose.level helpful
> interactive is False
> units is False
> platform is darwin
> Using fontManager instance from /Users/richard/.matplotlib/fontList.cache
> backend MacOSX version unknown
> 1.0.1
>
> The resulting figure:
>
>
>
>
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to