使用
eqnarray。您的代码的简化版本:
#!/usr/bin/pythonimport matplotlib.pyplot as pltfrom matplotlib import rcrc('text', usetex=True)rc('font', family='serif')r = 1v = 2i = 3plt.plot([1,2,3],[2,3,4],'ro-')plt.text(2,2,r"begin{eqnarray*}R_L&= 0\ V_2&= 1\ I_2&= 2end{eqnarray*}")#notes = r"noindent$$R_L = {0}\ V_2 = {1}\ I_2 = {2}$$".format(r, v, i)#plt.annotate(notes, xy=(5,5), xytext=(7,7))plt.show()为了使其正常工作,我必须安装dvipng(如此处建议的,http:
//matplotlib.sourceforge.net/users/usetex.html )



