solution for image distortion from Python's matplotlib to pdf

created at 06-27-2021 views: 31

Problem Description:

After Python runs the simulation image, it is usually copied directly into the word. I did the same at the beginning, it was very clear in the word.

It is still clear enough after zooming in the word, as follows:

But after saving as pdf, the picture will be distorted after zooming in, as follows:


Just add a statement before

plt.savefig('./filename.svg', format='svg')

Save the picture in svg format, and then insert the generated svg file into word.

created at:06-27-2021
edited at: 06-27-2021: