Ciro Santilli OurBigBook.com  Sponsor 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
matplotlib/legend_outside.py
#!/usr/bin/env python
"""
http://stackoverflow.com/questions/4700614/how-to-put-the-legend-out-of-the-plot
"""
def plot(plt, params):
    plt.plot([0, 1, 2, 3], label="x")
    plt.plot([0, 1, 4, 9], label="x^2")
    plt.legend(loc='center left', bbox_to_anchor=(1, 0.5))