Tuesday, May 19, 2009

Memo to use matplotlib.legend

Assume the legend example is like this
  • fig1.legend(E_on, ejection, loc = 7)
E_on is figure vector, ejection is string vector, loc is the location of legend.

You can use append to construct E_on and ejection
  • E_on.append(fig1_on.plot(x[k][j], y[k][j]))
Then you will get a very good legend figure like this.

No comments:

Clicky

Clicky Web Analytics