Sandro Tosi | 1 Feb 23:59
Picon
Favicon

Re: What would you like to see in a book about Matplotlib?

Hi Chris,
thanks for your reply, helpful as usual :)

On Fri, Jan 30, 2009 at 18:59, Chris Walker
<chrisw@...> wrote:
>       Firstly, good luck with the book.

cheers :)

> The sort of book I'd buy would explain how to use the combination of
> matplotlib/ipython/scipy/numpy to analyse data.

Sadly, that would not the book I'll write :( The editor wanted to
target another audience for the book: experienced python developers,
with no knowledge of matplotlib; so an introductionary book, that will
show even how to integrate mpl on GTK/WX application and on the web.

I pushed to have something about science, and a chapter will be about
that, but I need your (all) inputs, because my science days are long
back in the past ;)

>> - what are the (basic) things that, when you were beginning to use
>> matplotlib, you wanted to see grouped up but couldn't find?
>> - what would you like to see in a book about matplotlib?
>
> Start off by reading data from a file, plotting it and fitting a
> function to that data.

That sounds something that could land in the "science" chapter.

(Continue reading)

Fernando Perez | 2 Feb 05:05
Picon
Gravatar

A small patch for sphinxext tools

Hi all,

in various places I've been using the mpl sphinxext tools, so I
figured I'd best send you a few small updates I've made to them before
they bitrot too much.  Most of the changes are just cleanup and
documentation, though there is a functional fix in
inheritance_diagram, which was just not working for us in nipy.
There's a comment indicating the change,  I hope it makes sense.

I made the patch against svn trunk, though I can't quite test because
I'm getting this:

maqroll[doc]> ./make.py html
Traceback (most recent call last):
  File "./make.py", line 98, in <module>
    func()
  File "./make.py", line 31, in html
    shutil.copy('../lib/matplotlib/mpl-data/matplotlibrc',
'_static/matplotlibrc')
  File "/usr/lib/python2.5/shutil.py", line 85, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.5/shutil.py", line 51, in copyfile
    fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory:
'../lib/matplotlib/mpl-data/matplotlibrc'

I'm a bit surprised to see this problem, since I imagine you guys
build frequently.  But my svn is indeed up to date and that file is
just not there.  I'm not sure which way you want the fix to go, so
I'll leave that decision to you guys.
(Continue reading)

Jae-Joon Lee | 2 Feb 06:22
Picon
Gravatar

Re: A small patch for sphinxext tools

> I'm a bit surprised to see this problem, since I imagine you guys
> build frequently.  But my svn is indeed up to date and that file is
> just not there.  I'm not sure which way you want the fix to go, so
> I'll leave that decision to you guys.

I believe mpl-data/matplotlibrc is not version-controled, but created
when you run setup.py.
Maybe you're trying to build the documentation from a new svn checkout
but didn't build the library?

Regards,

-JJ

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
Fernando Perez | 2 Feb 08:26
Picon
Gravatar

Re: A small patch for sphinxext tools

On Sun, Feb 1, 2009 at 9:22 PM, Jae-Joon Lee <lee.j.joon@...> wrote:
>> I'm a bit surprised to see this problem, since I imagine you guys
>> build frequently.  But my svn is indeed up to date and that file is
>> just not there.  I'm not sure which way you want the fix to go, so
>> I'll leave that decision to you guys.
>
> I believe mpl-data/matplotlibrc is not version-controled, but created
> when you run setup.py.
> Maybe you're trying to build the documentation from a new svn checkout
> but didn't build the library?

Aha, that's it, thanks.  I'd run svn-clean just before to make sure I
had a clean setup before making the patch, so my build had just been
nuked.

Nothing to worry then, I just did a rebuild and it all seems to work.
So at least the patch doesn't completely crash the doc build :)

Cheers,

f

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
John Hunter | 2 Feb 13:42
Picon
Gravatar

Re: A small patch for sphinxext tools

On Mon, Feb 2, 2009 at 1:26 AM, Fernando Perez <fperez.net@...> wrote:

>> I believe mpl-data/matplotlibrc is not version-controled, but created
>> when you run setup.py.
>> Maybe you're trying to build the documentation from a new svn checkout
>> but didn't build the library?
>
> Aha, that's it, thanks.  I'd run svn-clean just before to make sure I
> had a clean setup before making the patch, so my build had just been
> nuked.
>
> Nothing to worry then, I just did a rebuild and it all seems to work.
> So at least the patch doesn't completely crash the doc build :)

Thanks Fernando -- applied to svn trunk.  I bumped into the svn-clean
no rc file bug just last week, and had to scratch my head for a
second.

JDH

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
Michael Droettboom | 2 Feb 14:31

Re: Pan and zoom tool makes markers disappear

Thanks for the report.  I'm not actually able to reproduce this here -- 
though I suspect this could be related to the recent path simplification 
changes.

Taking a stab in the dark -- have you tried removing the build directory 
and rebuilding?  distutils doesn't do dependency-tracking, so if header 
files change it often doesn't rebuild enough.

Mike

João Luís Silva wrote:
> Hi,
>
> I found a minor bug. Clicking with the pan and zoom tool on a plot with 
> markers and the markevery option makes the markers disappear.
>
> OS: Ubuntu
> Matplotlib svn revision 6861
> Backend: GTKAgg. Didn't test any others.
>
> Example script:
>
> ------------------------------------------------
> import matplotlib.pyplot as pl
> import numpy as np
>
> pl.plot(np.arange(100.0),np.arange(100.0),marker="+",markevery=5)
> pl.show()
> ------------------------------------------------
>
(Continue reading)

João Luís Silva | 2 Feb 16:39
Picon
Favicon

Re: Pan and zoom tool makes markers disappear

Michael Droettboom wrote:
> Thanks for the report.  I'm not actually able to reproduce this here -- 
> though I suspect this could be related to the recent path simplification 
> changes.
> 
> Taking a stab in the dark -- have you tried removing the build directory 
> and rebuilding?  distutils doesn't do dependency-tracking, so if header 
> files change it often doesn't rebuild enough.
> 

I didn't remove the build subdirectory, but always did a python setup.py 
clean / remove all mpl stuff from site-packages. Anyway, this time I did 
remove the build subdirectory but the problem remains. The bug seems to 
be backend independent and is there since the first support of 
markevery, on revision 6631. The problem seems to be that the function 
draw() of Line2D keeps removing the n-th marker for markevery=n, even if 
it has already done so. I tried to reproduce this on Windows, but the 
latest release (0.98.5) doesn't support markevery.

My 32-bit Ubuntu installation is pretty standard. I could reproduce this 
on two different computers with the same Ubuntu 8.10 and mpl svn.

If I run this script, select the pan/zoom tool and just click on the 
plot (not dragging, just left clicking in place) each click will remove 
every second marker until there are no markers left.

------------------------------------------
import matplotlib.pyplot as pl
import numpy as np

(Continue reading)

Chris Walker | 2 Feb 16:47
Picon

Re: What would you like to see in a book about Matplotlib?

On Sun, Feb 01, 2009 at 11:59:06PM +0100, Sandro Tosi wrote:
> Hi Chris,
> thanks for your reply, helpful as usual :)
> 
> On Fri, Jan 30, 2009 at 18:59, Chris Walker
> <chrisw@...> wrote:
> >       Firstly, good luck with the book.
> 
> cheers :)
> 
> > The sort of book I'd buy would explain how to use the combination of
> > matplotlib/ipython/scipy/numpy to analyse data.
> 
> Sadly, that would not the book I'll write :( The editor wanted to
> target another audience for the book: experienced python developers,
> with no knowledge of matplotlib; so an introductionary book, that will
> show even how to integrate mpl on GTK/WX application and on the web.
> 
> I pushed to have something about science, and a chapter will be about
> that, but I need your (all) inputs, because my science days are long
> back in the past ;)

Sure - though anyone wanting to use matplotlib is likely to be
acquiring, manipulating and then plotting data. 

> 
> >> - what are the (basic) things that, when you were beginning to use
> >> matplotlib, you wanted to see grouped up but couldn't find?
> >> - what would you like to see in a book about matplotlib?
> >
(Continue reading)

Michael Droettboom | 2 Feb 16:55

plotfile_demo.py broken?

I noticed plotfile_demo.py has recently broken.  Seems to be units 
related.  Before I look into it further, is there an obvious fix for 
anyone else?

Traceback (most recent call last):
  File "plotfile_demo.py", line 18, in <module>
    plotfile(fname, (0,5,6), plotfuncs={5:'bar'})
  File 
"/home/mdroe/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 
1513, in plotfile
    func(x, y, **kwargs)
  File "/home/mdroe/usr/lib/python2.5/site-packages/matplotlib/axes.py", 
line 4104, in bar
    left = xconv.convert( left, units )
TypeError: convert() takes exactly 3 arguments (2 given)
 > /home/mdroe/usr/lib/python2.5/site-packages/matplotlib/axes.py(4104)bar()
-> left = xconv.convert( left, units )

Mike

--

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

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
(Continue reading)

Michael Droettboom | 2 Feb 17:19

Re: Pan and zoom tool makes markers disappear

Thanks for narrowing this down.  I have (hopefully) fixed this in r6864.

Cheers,
Mike

João Luís Silva wrote:
> Michael Droettboom wrote:
>> Thanks for the report.  I'm not actually able to reproduce this here 
>> -- though I suspect this could be related to the recent path 
>> simplification changes.
>>
>> Taking a stab in the dark -- have you tried removing the build 
>> directory and rebuilding?  distutils doesn't do dependency-tracking, 
>> so if header files change it often doesn't rebuild enough.
>>
>
> I didn't remove the build subdirectory, but always did a python 
> setup.py clean / remove all mpl stuff from site-packages. Anyway, this 
> time I did remove the build subdirectory but the problem remains. The 
> bug seems to be backend independent and is there since the first 
> support of markevery, on revision 6631. The problem seems to be that 
> the function draw() of Line2D keeps removing the n-th marker for 
> markevery=n, even if it has already done so. I tried to reproduce this 
> on Windows, but the latest release (0.98.5) doesn't support markevery.
>
> My 32-bit Ubuntu installation is pretty standard. I could reproduce 
> this on two different computers with the same Ubuntu 8.10 and mpl svn.
>
> If I run this script, select the pan/zoom tool and just click on the 
> plot (not dragging, just left clicking in place) each click will 
(Continue reading)


Gmane