legend.py 305 B

1234567891011
  1. import matplotlib.pyplot as plt
  2. plt.subplot(223)
  3. plt.plot([1,2,3], label="400")
  4. plt.plot([1,2,3], label="1000")
  5. plt.plot([1,2,3], label="1200")
  6. plt.plot([1,2,3], label="1400")
  7. # Place a legend to the right of this smaller figure.
  8. plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
  9. plt.show()