[Numpy-discussion] wanted: decent matplotlib alternative
Zachary Pincus
zachary.pincus@yale....
Thu Oct 13 16:21:47 CDT 2011
I keep meaning to use matplotlib as well, but every time I try I also get really turned off by the matlabish interface in the examples. I get that it's a selling point for matlab refugees, but I find it counterintuitive in the same way Christoph seems to.
I'm glad to hear the OO interface isn't as clunky as it looks on some of the doc pages, though. This is good news. Can anyone point out any good tutorials/docs on using matplotlib idiomatically via its OO interface?
Zach
On Oct 13, 2011, at 3:21 PM, Joe Kington wrote:
> Have a look at Chaco: http://code.enthought.com/chaco/ If you're wanting a more pythonic api, it's a good choice.
>
> Personally, I still prefer matplotlib.
>
> You don't every need to touch the state machine interface.
>
> The OO interface is slighly un-pythonic, but it's hardly clunky. I think you're referring to one of the webpage examples of it which avoids _any_ convenience functions. You can still use the convenience functions without having to rely on the state machine in any way. E.g.:
>
> import matplotlib.pyplot as plt
>
> fig, axes = plt.subplots(ncols=4)
>
> for ax in axes:
> ax.plot(range(10))
>
> plt.show()
>
> All in all, matplotlib deliberately tries to mimic matlab for a lot of the conventions. This is mostly to make it easier to switch if you're already familiar with matlab.
>
> To each his own, but for better or worse, matplotlib is the most widely used plotting library for python. It's worth getting a bit more familiar with, if nothing else just to see past some of the rough edges.
>
> -Joe
>
>
>
> On Thu, Oct 13, 2011 at 1:58 PM, Christoph Groth <cwg@falma.de> wrote:
> Hello,
>
> Is it just me who thinks that matplotlib is ugly and a pain to use? So
> far I haven't found a decent alternative usable from within python. (I
> haven't tried all the packages out there.) I'm mostly interested in 2d
> plots. Who is happy enough with a numpy-compatible plotting package to
> recommend it?
>
> Thanks,
>
> Christoph
>
>
>
>
> A few things I can't stand about matplotlib:
>
> * It works as a state machine. (There is an OO-API, too, but it's ugly
> and cumbersome to use, and most examples use the state machine mode
> or, even worse, a mixture of OO and global state.)
>
> * It uses inches by default. (I propose to switch to nails: 1 nail = 3
> digits = 2 1/4 inches = 1/16 yard.)
>
> * subplot(211) (ugh!)
>
> * Concepts are named in a confusing way. ("ax = subplot(112)" anyone?)
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
More information about the NumPy-Discussion
mailing list