Michael Hannon wrote: > On Tue, Nov 11, 2008 at 07:13:46AM -1000, Eric Firing wrote: >> Michael Hannon wrote: >>> Greetings. I need to make some histograms from within a Python program, >>> and I noticed that Matplotlib, which I've never used before, appears to >>> have that capability. >>> >>> At: >>> http://matplotlib.sourceforge.net/ >>> >>> I see the following simple example: >>> >>> >>> from pylab import randn, hist >>> >>> x = randn(10000) >>> >>> hist(x, 100) >>> >>> And there is a more-extended example at: >>> >>> http://matplotlib.sourceforge.net/_static/plot_directive/mpl_examples/pylab_examples/histogram_demo.py >>> >>> Unfortunately, when I run either example I get nothing but complaints >>> and errors, as in the appended. >>> >>> This is on a system running 64-bit Fedora 9 and Python 2.5.1. >>> >>> I'm evidently doing something wrong. Will somebody please point me in >>> the right direction? >> >> It sounds like your matplotlib version is too old for your numpy >> version. What version of matplotlib are you using? Can you install a >> newer one, or, better yet, build from svn? (The warning from numpy is >> easy to deal with; the TypeError from matplotlib is what indicates that >> the version is incompatible.) >> >> Eric > > Hi, Eric. I'm using the packages provided by Fedora: > > numpy.x86_64 1.2.0-1.fc9 > python-matplotlib.x86_64 0.91.4-1.fc9 > > It appears that numpy is reasonably up-to-date, but Matplotlib appears > to be relatively old (although I don't know what d(version)/dt is).
Yes, your numpy is fine, but your matplotlib is an older branch, and although it is still being maintained it looks like it is not in sync with changes to numpy going from 1.1 to 1.2. I hope Fedora 10 has switched to the current branch, 0.98.x. In any case, however, matplotlib changes fast enough that it may be worthwhile building your own. It is very easy to do on a linux machine once the necessary headers are in place. Typically this involves installing several *dev or *devel packages--I don't know the specifics of Fedora packaging. Eric > > I'll look into installing from the source kits (and/or look into Fedora > 10, which will be shipping in a couple of weeks, IIRC). > > Thanks. > > - Mike ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users