Re: [Matplotlib-users] bar graph and legend

2007-09-14 Thread Gianluca Santarossa
> You want legend((bar1[0],bar2[0]), ('First','Second')). What happened > was that matplotlib made a legend entry for two of the blue bars in > bar1; it would have made six entries, but stopped because you only gave > it two labels. > > Dear Jouni, thanks for all the answers. Gianluca ---

Re: [Matplotlib-users] bar graph and legend

2007-09-14 Thread Jouni K . Seppänen
Gianluca Santarossa <[EMAIL PROTECTED]> writes: > In this example, on my PC both the entries in the legend appear in blue > color: > legend((bar1,bar2), ('First','Second')) You want legend((bar1[0],bar2[0]), ('First','Second')). What happened was that matplotlib made a legend entry for two of t

[Matplotlib-users] bar graph and legend

2007-09-14 Thread Gianluca Santarossa
Dear all, I am an unexperienced matplotlib user, and I have a couple of questions about adding a legend to a graph. In this example, on my PC both the entries in the legend appear in blue color: #!/usr/bin/env python import numarray as na from pylab import * labels = ["A", "B", "C"] first = [