I usually do this for line graphs with markers:
line, = self.subplot.plot_date(dates,data)
along with some keywords to tweak the plot. I then add line to a
dictionary to keep track of it:
self.line_to_data_dict[line] = self.activity
But today I tried this with a bar chart, just changing plot_date to
bar and renaming the "line," to "bars,":
fake_data = [2,2,5]
bars, = self.subplot.bar(fake_data, fake_data )
This gave me the error: ValueError: too many values to unpack.
OK, so if I removed the comma from "bars," so it is just "bars", it
goes through but then I cannot add it to my dictionary--I get:
> TypeError: list objects are unhashable
Help in understanding this and a better approach would be helpful. Thanks,
Che
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users