matplotlib - latex - savefig - OSError 无此文件或目录

2024-10-01 11:19:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我用python 2.7.3Agg后端生成一些png图形,并使用以下选项:

matplotlib.rc('font', family = 'serif', serif = 'cm10', size = 19)
matplotlib.rc('text', usetex = True)
matplotlib.rcParams['text.latex.preamble'] = [r'\boldmath']
matplotlib.rcParams['font.weight']         = 'bold'
matplotlib.rcParams['axes.linewidth']      = 2

图中的标签和标题。当我在我的集群上的登录节点上运行它时,代码运行得很好。当我把它提交到计算节点时

^{pr2}$

但是,如果我删除这些matplotlib选项并删除标签,这些图形就会毫无问题地保存在计算节点上。在

如何使用latex在计算节点上排版图形?在


Tags: text图形节点pngmatplotlib选项标签family