On 6/5/07, Erik Wickstrom <[EMAIL PROTECTED]> 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

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to