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 "".
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 "".
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。