From: John H. <jd...@gm...> - 2007-06-06 14:47:03
|
On 6/5/07, Erik Wickstrom <er...@er...> wrote: > ax = fig.add_subplot(111) > #from pylab import * > N = 7 > menMeans = (20, 35, 30, 35, 27, 21, 60) > ind = arange(N) # the x locations for the groups > #print ind > width = 0.35 # the width of the bars > ax = bar(ind, menMeans, width, color='b') You have commented out the line 'from pylab import *' which is the right thing for a web app server. But then you wrote ax = bar(ind, menMeans, width, color='b') which should raise a NameError because bar is defined in the pylab namespace. So it looks like somewhere in your code which you are not showing to us you have imported from pylab, which is wrong. What you want to do is ax = fig.add_subplot(111) ax.bar(ind, menMeans, width, color='b') and after that, read the user's guide, tutorial, the FAQ http://matplotlib.sourceforge.net/faq.html#OO, and the API tutorial http://matplotlib.sourceforge.net/leftwich_tut.txt <wink> JDH |