0
我要救我的乳胶字体情节,但我有错误:保存PDF与情节和乳胶
TypeError: a bytes-like object is required, not 'str'
我通过初始化乳胶pyplot:
plt.rc('text', usetex=True)
plt.rc('font', family='serif')
而且通过保存PDF :
fig.savefig('myplot.pdf', transparent=True)
保存所有的png作品,只有pdf失败。有任何想法吗?
你确定你有[安装PDF后端和主动(https://matplotlib.org/faq/usage_faq.html#what-是-A-后端)? –
保存为png或pdf,禁用TeX工作 – Pablo
您需要提供包含完整错误追溯的[mcve]。否则这个问题是没有用的。 – ImportanceOfBeingErnest