一、概念
(一)mabplotlib自带mathtext引擎,不需安装TeX系统
(二)作为开始和结束符,如‘ y=x+z importnumpyasnpimportmatplotlib.pyplotaspltfig=plt.figure()ax=fig.addsubplot(111)ax.setxlim([1,7])ax.setylim([1,5])ax.text(2,4,r’ (三)特殊字母的代码需要去官网查 二、实例 import numpy as np import matplotlib.pyplot as plt fig=plt.figure() ax=fig.add_subplot(111) ax.set_xlim([1,7]) ax.set_ylim([1,5]) ax.text(2,4,r' \alpha_i \beta_j \pi \lambda \omega $ ‘,size=25)
ax.text(4,4,r’$ \sin(0)=\cos(\frac{\pi}{2}) $ ‘,size=25)
ax.text(2,2,r’$ \lim_{x \rightarrow y} \frac{1}{x^3} $ ‘,size=25)
ax.text(4,2,r’$ \sqrt[4]{x}=\sqrt[2]{y} $ ',size=25)
plt.show()
mabplotlib——Tex公式

相关文章:

  • 2022-01-07
  • 2022-12-23
  • 2021-11-12
  • 2021-12-10
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
猜你喜欢
  • 2021-08-15
  • 2021-06-15
  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
  • 2021-04-28
  • 2021-05-10
相关资源
相似解决方案