Question

I've been trying for several hours to download/build/install/use matplotlib and am at my wit's end. I finally got it to build and it runs but doesn't display anything despite calling plt.show().

Is there an alternative to matplotlib? I just need something in Python to graph (x,y) data, in either lines or points. (I'm running Python 2.7 in Mac OSX 10.6)

edit: please point me at a source of binary installers for any reputable package besides matplotlib. Building from source code on my machine seem to have trouble for some reason.

Was it helpful?

Solution

Since posting this question I found out about the free Anaconda Python which has precompiled binaries for the major platforms, and includes matplotlib, so I've been using that.

OTHER TIPS

Even the .dmg files don't install, say, from here?

There are other options though. There's Chaco, gnuplot, and you can call R from Python, etc.

If you just need to plot points and lines, you could use Tkinter (which is probably already installed) and use a canvas widget. It's pretty much what it sounds like: a blank canvas with primitives for drawing lines, points, etc.

Take a look at PyCha or pyCairoChart if you are looking for simple Matplotlib alternatives. They are of course not as mature or versatile as Matplotlib is, but they might be enough for you.

First, matplotlib should be installable and most python plattforms, it has become a de-facto standard for plotting with python. I'm sad to read that you are struggling with the installation.

Second, you could have a look at ScientificPython (not to confuse with scipy). It has a simple TkPlotCanvas, providing some abstraction around the TkInter canvas widget. Maybe you can find a way to incorporate the relevant parts into you project. The license is CeCILL, yet another open-source variant. I don't know about your project and its license, but this could lead to seamless integration of plotting, without external dependencies.

You could try the Charts library which enables you to make plots in Python using the excellent javascript Highcharts library.

The library is mainly HTML/Javascript and only uses python standard libraries so it installs easily on any platform. Compared to matplotlib it offers almost all of their features and is able to make interactive charts!

Disclaimer: I'm the developper of the library.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top