1) Even for 2D, matplotlib is sloooooow. The program is
rather unpleasant to use. It takes forever to start up,
and there's about a 1-2 second lag while matplotlib replots
the data whenever the user makes a change.
That sounds slower than usual -- what are you plotting?
Delaunay triangulations of about 150 points. The user is then
allowed to select triangles and points to be altered.
2) Trying to distribute a matplotlib program with py2exe is
just brutal.
Darn. this is solvable, but apparently not easily. It seems to
bundle up OK with py2app on OS-X, which is similar. I think
that's because py2app has a "recipe" that bundles up all of
mpl be default.
Other's report success using py2exe, but they all seem to be
using different methods. In addition to just failing because
it can't find dlls, I've noticed that py2exe is also incliding
an entire tcl/tk distribution. Yikes.
I've come to the conclusion that matplotlib may be fine for
"stand-alone" interactive use (which was apparently the
original intent), but it's not really usable as a library.
It's usable for others, so you problem may be solvable.
What do people use for 2D plotting??
Have you tried Chaco? I haven't for a long time, but it sure looks nice.
If I can't get matplotlib to work, I'll take a look at it.
···
On 2007-04-11, Christopher Barker <Chris.Barker@noaa.gov> wrote:
--
Grant Edwards grante Yow! With YOU, I can be
at MYSELF... We don't NEED
visi.com Dan Rather...
Another option is FloatCanvas. I wrote it, and one of the
applications in mind is exactly that -- I use it for
triangular meshes with 1-10 thousand points with good
performance. It support full zooming and panning, etc.
That sounds cool. And I can handle mouse clicks?
It sure does. You can either get where the mouse was clicked in pixel coords on screen, "world" coords you draw your objects in, or you can bind events to clicking on different objects, so your callback is called when the object is clicked.
I use MPL when I want "tradition" plotting: X,Y data with axes, legends, etc.
FloatCanvas is designed for general purpose drawing in arbitrary floating point coordinates, with zooming, panning, mouse events, etc. It does not make axes for you (though you could use it to do so). You can also do mapping with it.
-Chris
···
On 2007-04-11, Christopher Barker <Chris.Barker@noaa.gov> wrote:
--
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
I do want axes, but I could always draw them myself.
yes, it's not hard.
After I get py2exe working, I'll have to try a few tricks to
see if I can speed it up. LineCollection sounds like something
worth trying. Right now I just pass axes.plot() 150 pairs of
line segment endpoints.
Is that one plot() call or 150? if 150, you can definitely get it faster with a LineCollection
-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
Yep, my mistake. I got the 'dll_excludes' in the setup options
correctly, but I had bungled the 'excludes' option.
···
On 2007-04-11, Andrea Gavana <andrea.gavana@gmail.com> wrote:
Hi Grant,
On 4/11/07, Grant Edwards wrote:
I finally got py2exe working, so I'll give them a try.
I'm still not sure why it's packing up 3.3MB of tcl and tk
source files (including demos). I presume it's because
matplotlib has the ability to use tcl/tk? I'll worry about that
later.
If you follow the suggestion I posted before, i.e.:
Obviously (I hope), the list of vectors is prepared separate
from the actual call to axes.plot() using a looping construct.
sure, but MPL is putting hundreds of separate line objects on the plot -- that's what's killing you.
> that's not unexpected since it includes numarry,
numpy, and numeric (and both Gnuplot and matplotlib).
OK, so you need gnuplot for 3-d, but why all three num* packages? It's really time for us all to go to numpy...
Not to keep bugging you about this, but if you used FloatCanvas, then you wouldn't need MPL, which is pretty big.
-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
I've decided it's time to give up on MPL and try FloatCanvas.
Although there seem to be people who claim success with
MPL+py2exe, I can't get it to work. I've already spent two
days fighting with MPL+py2exe and I'm getting nowhere.
···
On 2007-04-11, Christopher Barker <Chris.Barker@noaa.gov> wrote:
Or FloatCanvas -- I really did make for just this sort of
thing, and since it's not playing the multiple back-ends game,
it's pretty snappy.
--
Grant Edwards grante Yow! I just had a NOSE
at JOB!!
visi.com