Re: [Matplotlib-users] AttributeError: LineCollection instance has no attribute 'get_lines'

2007-04-09 Thread Eric Firing
Jouni K. Seppänen wrote:
> Eric Firing <[EMAIL PROTECTED]> writes:
> 
>> In any case, thanks for bringing the legend/LineCollection bug to my 
>> attention.  This is the sort of thing it is nice to get cleaned up 
>> before the next release, coming soon.  Do you know of some other simple 
>> bugs like this we should look at ASAP?
> 
> Of the bugs listed at http://sf.net/tracker/?group_id=80706&atid=560720
> I suspect a few would be simple to fix:
> 

Thanks for the suggestions.

> 1671570Invalid CSS 2 styles in SVG output
In this the invalid styles seem to be coming from freetype itself, as 
nearly as I can see.  Someone who understands ft2font needs to look at 
this one.

> 1650523inconsistent use of tabs and spaces in indentation
> 1605288import pylab with python -OO

I fixed these.

I also closed a couple others.  It would be nice to get many more of the 
bug reports closed; I think some are obsolete, but some are pointing to 
things that really should be fixed.  I am out of time for a while, 
though; I need to work on other things.

Eric


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib and py2exe

2007-04-09 Thread Werner F. Bruhin
Hi Emmanuel,

Maybe your problem has to do with your "enthought" build of wxPython.  I
use standard builds from wxPython site.

Emmanuel wrote:
> when putting the full path of wxmsw26u_vc_enthought.dll  in setup.py 
> like this
>
> data_files = [("lib\\matplotlibdata", mpfiles),
> matplotlib.get_py2exe_datafiles(), # if you don't 
> use the lib option
You get two copies of matplotlibdata as you kept both of the two above
lines active.  You need to use the first one of you use the py2exe
option to create a library.zip which I put into a sub-folder called
'lib' in the sample setup.py file.
> "C:\\Python24\\Lib\\site-packages\\wx-2.6.1.0-py2.4-win32.egg\\wx\\wxmsw26u_vc_enthought.dll",
> ##"wxmsw26u_vc_enthought.dll",
> ("prog\\", python4dll)
>]
>
You are also using an 'egg'.  I seem to recall that py2exe does not yet
really support that, but you might want to check on the py2exe list
(e.g. on the gmane mirror of it at
http://dir.gmane.org/gmane.comp.python.py2exe

Werner


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] AttributeError: LineCollection instance has no attribute 'get_lines'

2007-04-09 Thread John Hunter
On 4/9/07, Eric Firing <[EMAIL PROTECTED]> wrote:

> I also closed a couple others.  It would be nice to get many more of the
> bug reports closed; I think some are obsolete, but some are pointing to
> things that really should be fixed.  I am out of time for a while,
> though; I need to work on other things.

I think it is a good plan to try and knock out as many of these as
possible before the next release.  I'm pretty swamped until after next
Monday because all my free time will be going to preparing for a
python workshop with Fernando, but let's all try and do a bug or patch
per day, and shoot for some time after Monday a week for Monday to do
the release.
In related news, Eric, I say you were working on the date format
problem in the finance module.  Just so everyone is on the same page,
yahoo changed their output format to '%Y-%m-%d' so I changed the
format string in the finance module.  But people who have cached
downloads in ~/.matplotlib/finance.cache will still have data in the
old format.  Eric made some changes to support both with a try/except,
but at some point we'll want to remove that for performance reasons,
so the best course is to flush your cache.

JDH

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Program hangs when I call pylab.show()

2007-04-09 Thread Grant Edwards
I'm following the 3D plotting examples I found at 

http://www.scipy.org/Cookbook/Matplotlib/mplot3D

The problem is that my program hangs when I call pylab.show(),
it never returns: my program hangs.

How do I show a 3D plot without hanging my program?

-- 
Grant Edwards   grante Yow!  Is this where people
  at   are HOT and NICE and they
   visi.comgive you TOAST for FREE??


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Program hangs when I call pylab.show()

2007-04-09 Thread Lou Pecora
I assume you mean the first example, the wire frame
(see below).  It works for me.  No problems.  When
pylab (matplotlib) plots it does so in a window
associated with a Python process that is separate from
the terminal (I assume you are using a terminal).  You
might need to bring that process window to the
foreground.

Here's the code that worked for me:

from numpy import *
import pylab as p
import matplotlib.axes3d as p3

# u and v are parametric variables.
# u is an array from 0 to 2*pi, with 100 elements
u=r_[0:2*pi:100j]
# v is an array from 0 to 2*pi, with 100 elements
v=r_[0:pi:100j]

# x, y, and z are the coordinates of the points for
plotting
# each is arranged in a 100x100 array
x=10*outer(cos(u),sin(v))
y=10*outer(sin(u),sin(v))
z=10*outer(ones(size(u)),cos(v))

fig=p.figure()
ax = p3.Axes3D(fig)
ax.plot_wireframe(x,y,z)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
p.show()

--- Grant Edwards <[EMAIL PROTECTED]> wrote:

> I'm following the 3D plotting examples I found at 
> 
> http://www.scipy.org/Cookbook/Matplotlib/mplot3D
> 
> The problem is that my program hangs when I call
> pylab.show(),
> it never returns: my program hangs.
> 
> How do I show a 3D plot without hanging my program?
> 
> -- 
> Grant Edwards   grante



-- Lou Pecora,   my views are my own.
---
"I knew I was going to take the wrong train, so I left early." 
--Yogi Berra


 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-09 Thread Christopher Barker
belinda thom wrote:
> For anyone in my boat following this thread, here's what I ended up doing:

Thanks for the summary -- it's really nice to find this sort of thing 
when scanning archives in the future.

> I'm sad to hear that its not as easy to use matplotlib to write more 
> sophisticated apps than it is w/matlab

Well, there are balances to be struck here. If we wanted MPL to be full 
featured for GUI stuff -- we have to either pick on GUI toolkit, or 
essentially write full GUI toolkit -- and there really are enough already!

Maybe Matlab's gotten better than it was in my day (version 5), but 
while simple GUI stuff was doable -- it was really pretty limited and 
painful. If you want a GUI -- use a GUI toolkit. Once you get over the 
learning curve, you really will be happier -- so I think John has made 
the right choice limiting MPL's built-in capabilities.

> I intend to write a more serious 
> app using Python that needs a GUI (an audio file viewer and editor to be 
> used for my music perception research).

It will be well worth it to learn a real GUI toolkit for that kind of 
thing. BE sure to check out existing projects to that too -- Audacity, 
transana, etc.

> I've heard that Apple's own InterfaceBuilder is 
> THE WAY to program GUI-based apps and wonder if anyone has had 
> experience using this w/Python?

You can't. If you want Mac-only then you should certainly check out 
PyObjC -- and use InterfaceBuilder with it.

With wx, you can either write the interface code by hand (which I 
advocate), or use one of a handful of GUI-building tools:

Code Blocks
wxDesigner
wxGlade
XRCed
PythonCard
Dabo (I think they have one now)
etc

>> http://www.mithis.com/~chrisb
> 
> I never found the time to finish my matplotlib-scipy install from source 
> (b/c of the apple's wx incompatibility), but I do intend to finish with 
> that business when I return in June and am wondering if your above rec 
> about a wx latest-version would interfere with that?

Nope. I think MPL is working OK with wxPython2.8 now. I hope we'll get a 
build on pythonmac.org this week. In any case, FloatCanvas works with 
2.6 and 2.8.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Program hangs when I call pylab.show()

2007-04-09 Thread Utkarsh Upadhyay
Hi,

The examples worked for me too, and I am using IDLE on Windows. And
isn't the program supposed to return control to the terminal even if
the Graph Window is in the background?

There may be something wrong. Can you post the exact code that you are
trying to run and the version numbers? I am not an expert, but it may
help.

--musically_ut

On 4/9/07, Lou Pecora <[EMAIL PROTECTED]> wrote:
> I assume you mean the first example, the wire frame
> (see below).  It works for me.  No problems.  When
> pylab (matplotlib) plots it does so in a window
> associated with a Python process that is separate from
> the terminal (I assume you are using a terminal).  You
> might need to bring that process window to the
> foreground.
>
> Here's the code that worked for me:
>
> from numpy import *
> import pylab as p
> import matplotlib.axes3d as p3
>
> # u and v are parametric variables.
> # u is an array from 0 to 2*pi, with 100 elements
> u=r_[0:2*pi:100j]
> # v is an array from 0 to 2*pi, with 100 elements
> v=r_[0:pi:100j]
>
> # x, y, and z are the coordinates of the points for
> plotting
> # each is arranged in a 100x100 array
> x=10*outer(cos(u),sin(v))
> y=10*outer(sin(u),sin(v))
> z=10*outer(ones(size(u)),cos(v))
>
> fig=p.figure()
> ax = p3.Axes3D(fig)
> ax.plot_wireframe(x,y,z)
> ax.set_xlabel('X')
> ax.set_ylabel('Y')
> ax.set_zlabel('Z')
> p.show()
>
> --- Grant Edwards <[EMAIL PROTECTED]> wrote:
>
> > I'm following the 3D plotting examples I found at
> >
> > http://www.scipy.org/Cookbook/Matplotlib/mplot3D
> >
> > The problem is that my program hangs when I call
> > pylab.show(),
> > it never returns: my program hangs.
> >
> > How do I show a 3D plot without hanging my program?
> >
> > --
> > Grant Edwards   grante
>
>
>
> -- Lou Pecora,   my views are my own.
> ---
> "I knew I was going to take the wrong train, so I left early."
> --Yogi Berra
>
>
>
> 
> Bored stiff? Loosen up...
> Download and play hundreds of games for free on Yahoo! Games.
> http://games.yahoo.com/games/front
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>


-- 
Never trust a spiritual leader who cannot dance. ~Mr. Miyagi, The Next
Karate Kid

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] AttributeError: LineCollection instance has no attribute 'get_lines'

2007-04-09 Thread Eric Firing
John Hunter wrote:
> On 4/9/07, Eric Firing <[EMAIL PROTECTED]> wrote:
> 
>> I also closed a couple others.  It would be nice to get many more of the
>> bug reports closed; I think some are obsolete, but some are pointing to
>> things that really should be fixed.  I am out of time for a while,
>> though; I need to work on other things.
> 
> I think it is a good plan to try and knock out as many of these as
> possible before the next release.  I'm pretty swamped until after next
> Monday because all my free time will be going to preparing for a
> python workshop with Fernando, but let's all try and do a bug or patch
> per day, and shoot for some time after Monday a week for Monday to do
> the release.
> In related news, Eric, I say you were working on the date format
> problem in the finance module.  Just so everyone is on the same page,
> yahoo changed their output format to '%Y-%m-%d' so I changed the
> format string in the finance module.  But people who have cached
> downloads in ~/.matplotlib/finance.cache will still have data in the
> old format.  Eric made some changes to support both with a try/except,
> but at some point we'll want to remove that for performance reasons,
> so the best course is to flush your cache.

John,

Thanks for the explanation.  I made another change.  It should still 
support both formats, but with only a single try/except to decide which 
format to use, so the performance penalty should be negligible.  The 
advantage is that we won't get questions (as we have at least once) 
about "why doesn't finance_demo.py work?"

Here are the relevant lines from finance.py (slightly mangled by the 
mailer, as usual):

 datefmt = None

 for line in lines[1:]:

 vals = line.split(',')

 if len(vals)!=7: continue
 datestr = vals[0]
 if datefmt is None:
 try:
 datefmt = '%Y-%m-%d'
 dt = datetime.date(*time.strptime(datestr, datefmt)[:3])
 except ValueError:
 datefmt = '%d-%b-%y'  # Old Yahoo--cached file?
 dt = datetime.date(*time.strptime(datestr, datefmt)[:3])
 d = date2num(dt)


Eric

> 
> JDH


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Program hangs when I call pylab.show()

2007-04-09 Thread Grant Edwards
On 2007-04-09, Lou Pecora <[EMAIL PROTECTED]> wrote:

> I assume you mean the first example, the wire frame (see
> below).  It works for me.

I've tried that code as well, and p.show() doesn't return until
the window is closed.  If I use code like that in a python
program, the program becomes non-responsive until the plot
window is closed.

I've switched to using wxmpl to embed figure in a wxWidgets
panel. That almost works -- except I loose the ability for the
user to rotate/zoom using the mouse.

> No problems.  When pylab (matplotlib) plots it does so in a
> window associated with a Python process that is separate from
> the terminal (I assume you are using a terminal).

I'm not sure what you mean by "using a terminal".  I'm running
my python app from the command line in a terminal emulator
window.

-- 
Grant Edwards   grante Yow!  Hey, I LIKE that
  at   POINT!!
   visi.com


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Program hangs when I call pylab.show()

2007-04-09 Thread Suresh Pillai
I get this behaviour as well, but only on first usage of show(). 
However, after that there is no problem.  The default is to start off with 
interactive mode off, but the first usage of show() turns it on.

So I would guess that the problem is that with interactive mode turned 
off, the figure window is not returning.

On Mon, 9 Apr 2007, Grant Edwards wrote:

> I've tried that code as well, and p.show() doesn't return until
> the window is closed.  If I use code like that in a python
> program, the program becomes non-responsive until the plot
> window is closed.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Program hangs when I call pylab.show()

2007-04-09 Thread Lou Pecora
Some answers:

--- Grant Edwards <[EMAIL PROTECTED]> wrote:

> On 2007-04-09, Lou Pecora <[EMAIL PROTECTED]>
> wrote:
> 
> > I assume you mean the first example, the wire
> frame (see
> > below).  It works for me.
> 
> I've tried that code as well, and p.show() doesn't
> return until
> the window is closed.  If I use code like that in a
> python
> program, the program becomes non-responsive until
> the plot
> window is closed.

That is how pylab works.  The program has to respond
to events in the plot window and cannot respond to the
command line.

> I've switched to using wxmpl to embed figure in a
> wxWidgets
> panel. That almost works -- except I loose the
> ability for the
> user to rotate/zoom using the mouse.

I have not tried this approach very much.  I'm sorry,
but I can't think of a way to retain the rotate/zoom. 
Perhaps others can offer help.

> > No problems.  When pylab (matplotlib) plots it
> does so in a
> > window associated with a Python process that is
> separate from
> > the terminal (I assume you are using a terminal).
> 
> I'm not sure what you mean by "using a terminal". 
> I'm running
> my python app from the command line in a terminal
> emulator
> window.

Yes, that is what I meant by using a terminal.



-- Lou Pecora,   my views are my own.
---
"I knew I was going to take the wrong train, so I left early." 
--Yogi Berra



 

Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Program hangs when I call pylab.show()

2007-04-09 Thread Ken McIvor
On Apr 9, 2007, at 1:16 PM, Grant Edwards wrote:
>
> I've switched to using wxmpl to embed figure in a wxWidgets
> panel. That almost works -- except I loose the ability for the
> user to rotate/zoom using the mouse.

I'm afraid that the current version of WxMpl doesn't play nicely with  
matplotlib's event system.  I hope to integrate the two event models  
so stuff like 3D rotations work.  Unfortunately that probably won't  
be happening for some time yet.

Ken



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Program hangs when I call pylab.show()

2007-04-09 Thread Grant Edwards
On 2007-04-09, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-04-09, Lou Pecora <[EMAIL PROTECTED]> wrote:
>
>> I assume you mean the first example, the wire frame (see
>> below).  It works for me.
>
> I've tried that code as well, and p.show() doesn't return until
> the window is closed.  If I use code like that in a python
> program, the program becomes non-responsive until the plot
> window is closed.
>
> I've switched to using wxmpl to embed figure in a wxWidgets
> panel. That almost works -- except I loose the ability for the
> user to rotate/zoom using the mouse.

I think I'm going to have to switch to using gnuplot for the 3D
window.  Matplotlib is just too slow. The 3D window takes about
2 seconds to plot, and whan the user rotates the image, it only
updates at about 1fps.  Gnuplot does the plot pretty much
instantaneously and rotates and zooms smoothly, so that's
probably going to be the deciding factor...

-- 
Grant Edwards   grante Yow!  Is it 1974? What's
  at   for SUPPER? Can I spend my
   visi.comCOLLEGE FUND in one wild
   afternoon??


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users