Saving images in Python at a very high quality

后端 未结 5 796
北恋
北恋 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 15:59

    You can save to a figure that is 1920x1080 (or 1080p) using:

    fig = plt.figure(figsize=(19.20,10.80))
    

    You can also go much higher or lower. The above solutions work well for printing, but these days you want the created image to go into a PNG/JPG or appear in a wide screen format.

提交回复
热议问题