matplotlib对LaTeX数学公式的支持

Matlplotlib对LaTeX有一定的支持,如果记得使用raw字符串语法会很自然:

xlabel(r"x2y4x2y4")

在matplotlib里面,可以使用LaTex的命令来编辑公式,只需要在字符串前面加一个“r”即可

Here is a simple example:

# plain text
plt.title('alpha > beta')

produces “alpha > beta”.

Whereas this:

     

produces "".

 

posted @ 2018-01-15 18:49  Laumians  阅读(3953)  评论(0编辑  收藏  举报