Tag: xelatex

关于正确使用matplotlib rcParams的问题

我正在为我的物理实验写一份报告。 为此,我使用PyLab64bit,XeLaTex,Excel。 我在Excel表格中写入测量数据,然后使用import -xlrd获取用于绘制和计算的.py脚本的数据。 绘图保存为.pdf,稍后将包含在.tex文件中。 现在大部分步骤都可以正常工作,我对我的第一份报告很满意。 然而,对于第二份报告,我需要一些增强function,主要是关于颜色文本和字体匹配。 如果我看看这里给出的第二个例子( http://matplotlib.org/users/usetex.html ) from __future__ import unicode_literals import matplotlib as mpl mpl.rcParams['text.usetex']=True mpl.rcParams['text.latex.unicode']=True from numpy import arange, cos, pi from matplotlib.pyplot import (figure, axes, plot, xlabel, ylabel, title, grid, savefig, show) figure(1, figsize=(6,4)) ax = axes([0.1, 0.1, 0.8, 0.7]) t = arange(0.0, 1.0+0.01, 0.01) s = cos(2*2*pi*t)+2 plot(t, […]