在将Anaconda更新为新版本之前,图形看起来像图(左图)。更新网格后,更改了轴字体,线条粗细和标签(右图)。然而,今天它开始再次给出左图(较旧),即使两个图的代码是相同的。我想保留除旧版本的font-family之外的最新样式(在图中标出)。为什么会发生这种情况?我如何获得控制权?
import matplotlib.pyplot as plt
from numpy import loadtxt
import matplotlib as mpl
data = loadtxt("ES1-10sr_CV.txt",float)
potential = data[:,0]
current_density = data[:,1]
current_density = current_density*1e6
ax = plt.gca()
ax.get_yaxis().get_major_formatter().set_useOffset(False)
plt.plot(potential,current_density, color="blue")
plt.xlabel(r'$\mathrm{V_f \ (V \ vs. \ Ref.)}$', fontsize=16)
plt.ylabel(r'$\mathrm{Current \ Density} \ (\mu{A}/cm^2$)', fontsize=16)
#plt.legend(loc=4,prop={'size':14},
# ncol=1, shadow=True, fancybox=True)
plt.grid(True)
plt.tight_layout()
mpl.rcParams.update({'font.size': 10})
plt.savefig('ES1-10sr_CV.tiff', dpi=1000, bbox_inches='tight')