如何打印数学符号

Par*_*sia 4 python printing math matplotlib

我想使用 print() 在 python 中打印数学,因为可以使用 matplotlib 在绘图的标签中执行此操作(有关可以使用 matplotlib https://matplotlib.org/tutorials/text/mathtext编写的所有数学,请参阅此链接.html ) 这可能吗?我尝试了以下方法(如在 matplotlib 中):

print(r'$\Delta v$:', delta)
Run Code Online (Sandbox Code Playgroud)

例如,打印希腊语增量,但它不起作用(因为它不是 matplotlib 函数),它显示:$\Delta v$: delta

Kur*_*ine 5

实际上,您可以在 Python 中毫无问题地打印字符。只需通过 Google 搜索找到关联的 unicode 字符并将它们复制/粘贴到您的打印语句中即可。

\n\n
print('\xce\x94')\nprint('\xce\xb1')\n
Run Code Online (Sandbox Code Playgroud)\n