Matplotlib - How to plot a high resolution graph?

前端 未结 6 1708
情深已故
情深已故 2020-12-07 13:16

I\'ve used matplotlib for plotting some experimental results (discussed it in here: Looping over files and plotting. However, saving the picture by clicking right to the ima

6条回答
  •  借酒劲吻你
    2020-12-07 13:39

    You can use savefig() to export to an image file:

    plt.savefig('filename.png')
    

    In addition, you can specify the dpi argument to some scalar value, for example:

    plt.savefig('filename.png', dpi=300)
    

提交回复
热议问题