> Unfortunately my graph is generated dynamically. How can I create my > legend when my 'bar' objects have no names to refer to? > > for admin in bd: > bar(ind, bd[admin], width, color=colordict[admin]) > xticks(ind+width/2., datenames) > legend() > grid('on') > outfile = 'testfile.png' > savefig('/var/www/'+outfile) > return outfile
I found the solution to this problem, one of the optional kwargs for the pyplyt.bar() function is "label". Once I assigned that, legend() worked fine. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor