1

The problem is described as the title.

For example:

import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
mpl.rcParams['font.sans-serif'] = ['SimHei']

plt.figure()
plt.title('哈哈')
plt.savefig('try.png')
plt.savefig('try.eps')

Then, the results:

try.png :

enter image description here

try.eps :

enter image description here

The saving method works fine with 'png', 'jpg', but it cannot render chinese characters in 'eps'. Besides, you can find the number's font in the eps plot also looks weird.

AlexK
  • 2,855
  • 9
  • 16
  • 27
KFZ
  • 369
  • 1
  • 3
  • 10
  • Have you looked at these questions: https://stackoverflow.com/q/39630928/9987623 & https://stackoverflow.com/q/21307832/9987623? – AlexK Mar 11 '19 at 07:57

0 Answers0