[matplotlib-devel] problem plotting log (works with 0.98.5.3)

2009-09-17 Thread Sandro Tosi
Hello,
with 0.99.{0, 1rc1} I have problem with this code:

In [1]: import matplotlib.pyplot as plt

In [2]: import numpy as np

In [3]: x = np.arange(0., np.e, 0.01)

In [4]: y = np.log(x)

In [5]: print y[:2], y[-2:]
[   -Inf -4.60517019] [ 0.99325177  0.99694863]

In [6]: plt.plot(x, y);

In [7]: plt.show()

that generates the image attached, that's clearly wrong :)

I works fine with 0.98.5.3, so there's something in the 0.99.* that broke.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
<>--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] sampledoc: mark out prompts in ipython sessions?

2009-09-17 Thread Michael Droettboom
Looks fine to me.  We were offering to commit this to matplotlib, or 
should I?

Mike

Fernando Perez wrote:
> Howdy,
>
> this fixes the ipython console sphinx extension to mark up output
> prompts as well.  Mind if I put it in?
>
> Thanks,
>
> f
>
> maqroll[sphinxext]> diff -u ipython_console_highlighting.py
> ~/research/papers/nitime/sphinxext/ipython_console_highlighting.py
> --- ipython_console_highlighting.py   2009-08-26 00:03:06.0 -0700
> +++ 
> /home/fperez/research/papers/nitime/sphinxext/ipython_console_highlighting.py 
> 2009-09-11
> 18:03:19.0 -0700
> @@ -77,8 +77,11 @@
> [(0, Generic.Prompt,
> continue_prompt.group())]))
>  curcode += line[continue_prompt.end():]
>  elif output_prompt is not None:
> +# Use the 'error' token for output.  We should probably make
> +# our own token, but error is typicaly in a bright color like
> +# red, so it works fine for our Output prompts.
>  insertions.append((len(curcode),
> -   [(0, Generic.Output,
> output_prompt.group())]))
> +   [(0, Generic.Error,
> output_prompt.group())]))
>  curcode += line[output_prompt.end():]
>  else:
>  if curcode:
>
> --
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] sampledoc: mark out prompts in ipython sessions?

2009-09-17 Thread John Hunter
On Thu, Sep 17, 2009 at 9:30 AM, Michael Droettboom  wrote:
> Looks fine to me.  We were offering to commit this to matplotlib, or
> should I?

You should let Fernando, so he can survive the annual purge of
developers no longer committing :-)

--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] problem plotting log (works with 0.98.5.3)

2009-09-17 Thread Michael Droettboom
Yes -- a bug was introduced where non-finite values were no longer being 
ignored by the data extents finder.  This has now been fixed on the 
0.99.x branch (r7774) and the trunk.

Mike

Sandro Tosi wrote:
> Hello,
> with 0.99.{0, 1rc1} I have problem with this code:
>
> In [1]: import matplotlib.pyplot as plt
>
> In [2]: import numpy as np
>
> In [3]: x = np.arange(0., np.e, 0.01)
>
> In [4]: y = np.log(x)
>
> In [5]: print y[:2], y[-2:]
> [   -Inf -4.60517019] [ 0.99325177  0.99694863]
>
> In [6]: plt.plot(x, y);
>
> In [7]: plt.show()
>
> that generates the image attached, that's clearly wrong :)
>
> I works fine with 0.98.5.3, so there's something in the 0.99.* that broke.
>
> Regards,
>   
>
> 
>
> 
>
> --
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> 
>
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] sampledoc: mark out prompts in ipython sessions?

2009-09-17 Thread Fernando Perez
2009/9/17 John Hunter :
> On Thu, Sep 17, 2009 at 9:30 AM, Michael Droettboom  wrote:
>> Looks fine to me.  We were offering to commit this to matplotlib, or
>> should I?
>
> You should let Fernando, so he can survive the annual purge of
> developers no longer committing :-)

Thanks :)  I'll take care of it later then, I'll try to fix a warning
we're seeing as well because it lacks a setup.py.

Cheers,

f

--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] problem plotting log (works with 0.98.5.3)

2009-09-17 Thread Andrew Straw
Michael Droettboom wrote:
> Yes -- a bug was introduced where non-finite values were no longer being 
> ignored by the data extents finder.  This has now been fixed on the 
> 0.99.x branch (r7774) and the trunk.
>   
Hi Mike,

This would seem like something useful to write a test for to make sure
these regressions don't slip in in the future. Would it be easy to write
a test (image based or non image based)? If so, would you mind doing it
and checking it into the trunk? You can look at
lib/matplotlib/tests/test_axes.py and lib/matplotlib/tests/test_basic.py
for examples.

Also, apologies about the buildbot master being down last night and this
morning. It's back online now.

-Andrew

--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] problem plotting log (works with 0.98.5.3)

2009-09-17 Thread Michael Droettboom
Good point.  A test based on Sandro's example has been committed to SVN.

Mike

Andrew Straw wrote:
> Michael Droettboom wrote:
>   
>> Yes -- a bug was introduced where non-finite values were no longer being 
>> ignored by the data extents finder.  This has now been fixed on the 
>> 0.99.x branch (r7774) and the trunk.
>>   
>> 
> Hi Mike,
>
> This would seem like something useful to write a test for to make sure
> these regressions don't slip in in the future. Would it be easy to write
> a test (image based or non image based)? If so, would you mind doing it
> and checking it into the trunk? You can look at
> lib/matplotlib/tests/test_axes.py and lib/matplotlib/tests/test_basic.py
> for examples.
>
> Also, apologies about the buildbot master being down last night and this
> morning. It's back online now.
>
> -Andrew
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] automatic label setting in Axes.add_* methods?

2009-09-17 Thread Jae-Joon Lee
Hi,

add_line method sets label to something like "_line1" if not set.

def add_line(self, line):

if not line.get_label():
line.set_label('_line%d'%len(self.lines))


add_collection sets label to "collection1" if not set.

def add_collection(self, collection, autolim=True):

label = collection.get_label()
if not label:
collection.set_label('collection%d'%len(self.collections))


add_patch does nothing.


Can someone enlighten me why add_line and add_collection method sets the label?

Actually, my issue here is that collections without empty label show
up in the legend as "collection1" etc., instead of being ignored.

Regards,

-JJ

--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] getp broken

2009-09-17 Thread Eric Firing
Jouni K. Seppänen wrote:
> I just happened to type getp(gca()) on matplotlib 0.99.0, and the output
> looks all garbled:

Fixed in r7780 (branch) and 7781 (trunk).

Eric

> 
 getp(gca())
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axes.py:1269:
>  DeprecationWarning: use ax.patch instead
>   warnings.warn('use ax.patch instead', DeprecationWarning)
> stable = box
> a = 1.0
> or = C
> ated = False
> ct = auto
> scale_on = True
> scalex_on = True
> scaley_on = True
>  = Axes(0.125,0.1;0.775x0.8)
> _locator = None
> _bgcolor = w
> [...]
> 
> It's been a long time since I last tried this, but does anyone have an
> idea what changes could have caused this? Could it be related to the
> ReST formatting in the docstrings?
> 
> Querying single attributes as in getp(gca(), 'yscale') seems to work
> fine, it's just this listing of all attributes that seems to be broken.
> 



--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Two same demos

2009-09-17 Thread Gökhan Sever
Apparently usetex_demo.py and dannys_example.py are same
(matplotlib/examples).

The latter might be deleted if no reference exist for that file.

-- 
Gökhan
--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel