Saving images in Python at a very high quality

后端 未结 5 786
北恋
北恋 2020-11-29 15:43

How can I save Python plots at very high quality?

That is, when I keep zooming in on the object saved in a PDF file, why isn\'t there any blurring?

Also, what

5条回答
  •  执念已碎
    2020-11-29 16:02

    Okay, I found spencerlyon2's answer working. However, in case anybody would find himself/herself not knowing what to do with that one line, I had to do it this way:

    beingsaved = plt.figure()
    
    # Some scatter plots
    plt.scatter(X_1_x, X_1_y)
    plt.scatter(X_2_x, X_2_y)
    
    beingsaved.savefig('destination_path.eps', format='eps', dpi=1000)
    

提交回复
热议问题