RFC: matplotlib vs. Chaco

Hi all,

I'm evaluating the Chaco plotting library from Enthought (part of the ETS) for a project and comparing it to Matplotlib. I'm wondering if anybody here has experience with both and would like to share a few thoughts about them?

* Which do you prefer? Why?

* In general, which is faster?

* Which is easier to use from an application programming perspective?

* Were there any significant problems that you had to overcome or work around?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org

I have no experience with Chaco. However, I do have a really big
caveat about matplotlib (which feature-wise is generally excellent)
for deployed apps: the dependence on writing to the user's home
directory frequently causes catastrophic failures. The problem I've
most often seen is that it caches font locations, and if these
disappear, the library simply crashes instead of ignoring the cache.
I complained about this to the maintainers, and 10 months later, the
1.1 release still did not fix the problem. They're obviously more
focused on the interactive user than applications programmers (the
documentation reflects this too).

My only other complaint about matplotlib (which may be obsolete now)
is that I found the 3D plotting unusably slow. I didn't really need
this feature, fortunately.

-Nat

···

On Mon, Jun 25, 2012 at 2:35 PM, Robin Dunn <robin@alldunn.com> wrote:

* Were there any significant problems that you had to overcome or work
around?

I'm evaluating the Chaco plotting library from Enthought (part of the ETS)
for a project and comparing it to Matplotlib. I'm wondering if anybody here
has experience with both and would like to share a few thoughts about them?

We have incorporated Matplotlib into several of our own applications
and are generally quite happy with its usability and feature set, and
a little less with its performance. We are doing real-time plotting of
data from sensors and it starts bogging down with large data sets.

* Which do you prefer? Why?

We evaluated Chaco and matplotlib several (3? 4?) years ago and
decided that we didn't like the overhead of Traits. We did not want to
refactor our code to be Traits-friendly. Additionally, the Chaco
documentation (at the time) was pretty poor while the matplotlib
documentation was generally pretty good. These limitations might have
been resolved by now, but we've haven't gone back to re-evaluate
Chaco.

Hi Robin,

Hi all,

I'm evaluating the Chaco plotting library from Enthought (part of the ETS)
for a project and comparing it to Matplotlib.

Welcome to the world of plotting -D

I'm wondering if anybody here
has experience with both and would like to share a few thoughts about them?

* Which do you prefer? Why?

* In general, which is faster?

* Which is easier to use from an application programming perspective?

* Were there any significant problems that you had to overcome or work
around?

I would second Nathaniel's and Anthony's opinions. I have never used
Chaco myself, although I have tried to evaluate it a few years back,
but I got put off by all this Trait stuff, which for me was (and
probably still is) a bit overwhelming.

I have thrown in matplotlib in every application I have developed, and
I have been happy so far. The API can be sometimes a bit awkward, but
the documentation is excellent (and I hope we will end up having
similar stuff for Phoenix, with lots of examples and contributed code)
and you can always find your way out.

I have done some 3D stuff with it, but matplotlib is not designed for
efficient 3D rendering (nor is Chaco, unless I am mistaken). If you're
serious about 3D plots, you might want to look into VTK.

I never had to deal with real-time plotting of continuous data, so I
can't comment on that.

Since the various last GSoCs the usability, versatility and
customizability of matplotlib have become impressive, and I don't
recall a single occasion in which I wasn't able to do what I imagined
in my mind. There were few obscure cases in which I had to beat the
library into submission by using horrible tricks and workarounds, but
their frequency has now slowed to a trickle (possibly zero) since the
last few releases.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On 25 June 2012 23:35, Robin Dunn wrote:

Hi Andrea,

in my mind. There were few obscure cases in which I had to beat the
library [matplotlib] into submission by using horrible tricks and workarounds,

I just had to say: I know that feeling with matplotlib! :smiley: There
are still some inherent problems with it that I hope get improved,
such as a problem with ticks badly overlapping in certain cases (still
working on a workaround there), and the fact that by default data is
plotted tight to the exact edge of the plot (whereas it should have a
small margin--real plots are usually not plotted so tight). They have
made some nice improvements, though, as you said, and overall it's a
great project.

Che

such as a problem with ticks badly overlapping

(Actually tick labels, sorry)

Hi Che,

Hi Andrea,

in my mind. There were few obscure cases in which I had to beat the
library [matplotlib] into submission by using horrible tricks and workarounds,

I just had to say: I know that feeling with matplotlib! :smiley: There
are still some inherent problems with it that I hope get improved,
such as a problem with ticks badly overlapping in certain cases (still
working on a workaround there), and the fact that by default data is
plotted tight to the exact edge of the plot (whereas it should have a
small margin--real plots are usually not plotted so tight). They have
made some nice improvements, though, as you said, and overall it's a
great project.

It is, although it normally takes a few trial-and-error steps to get a
plot looking the way I want. What I miss the most is the interactive
editing of line styles, axes limits and the likes (similar to what
Matlab does), so that I could pop up a plot window, double click here
and there and change a few things (line colour, markers, fonts and so
on) and then be happy with the results.

Implementing all of this with the wx backend would be ridiculously
easy (via a configuration dialog popping up on double click on the
plot window, for example), but my attempts to propose this on the
matplotlib mailing list have been met with scepticism, mostly because
the same functionality would need to be implemented for all the other
7906610643 backends before even thinking of integrating it into
matplotlib itself (and I have no intention whatsoever of wasting my
time with the crappy Tk and Qt).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On 26 June 2012 20:46, C M wrote:

plot looking the way I want. What I miss the most is the interactive
editing of line styles, axes limits and the likes (similar to what
Matlab does), so that I could pop up a plot window, double click here
and there and change a few things (line colour, markers, fonts and so
on) and then be happy with the results.

Implementing all of this with the wx backend would be ridiculously
easy

indeed -- I think it's been done:

http://newville.github.com/wxmplot/

Though I don't know how full-featured it is.

-Chris

(via a configuration dialog popping up on double click on the

···

On Tue, Jun 26, 2012 at 11:56 AM, Andrea Gavana <andrea.gavana@gmail.com> wrote:

plot window, for example), but my attempts to propose this on the
matplotlib mailing list have been met with scepticism, mostly because
the same functionality would need to be implemented for all the other
7906610643 backends before even thinking of integrating it into
matplotlib itself (and I have no intention whatsoever of wasting my
time with the crappy Tk and Qt).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

--

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

Chris.Barker@noaa.gov

Hi Robin,

I'm wondering what's your opinion 6 months later.
How Chaco compares to Matplotlib?

Marcin

···

On Jun 25, 9:35 pm, Robin Dunn <ro...@alldunn.com> wrote:

Hi all,

I'm evaluating the Chaco plotting library from Enthought (part of the
ETS) for a project and comparing it to Matplotlib. I'm wondering if
anybody here has experience with both and would like to share a few
thoughts about them?

* Which do you prefer? Why?

* In general, which is faster?

* Which is easier to use from an application programming perspective?

* Were there any significant problems that you had to overcome or work
around?

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

We ended up going with Matplotlib for the project, but mainly because it is very widely used and so there was an answer for any question that we had just a google search away, and the docs are more complete.

On the other hand, Chaco has a *very* well designed API, very OO and modular. It was faster on most of the tests that I threw at it, sometimes taking around 1/3 to 1/2 the time to complete a plot than doing the same or similar thing with Matplotlib. The plots were a little better looking IMO as well. I really wanted to like it better and use it instead, but the docs were lacking, and tracking down solutions to problems was difficult. While it's very capable and flexible that also adds complexity, and the libraries it's built upon are rather complex as well and some have a bit of a mind bending learning curve.

···

On 11/14/12 5:42 AM, Marcin Wojdyr wrote:

Hi Robin,

I'm wondering what's your opinion 6 months later.
How Chaco compares to Matplotlib?

--
Robin Dunn
Software Craftsman