python中pi
PI (π) is very often used greek mathematical letters and has a higher repetition in circular geometry and probability. In this article, we are going to add π using a command in matplotlib.
PI(π)是非常常用的希腊数学字母,并且在圆形几何形状和概率上具有较高的重复率。 在本文中,我们将使用matplotlib中的命令添加π 。
plt.text(3, 0.4, r'$\pi=100$')
#Adding π as text
![Python | Adding Pi in Plot Label (1)](https://i-blog.csdnimg.cn/blog_migrate/c46316eb5edb63ebf603c4173cc71449.png)
plt.title('Errorbar with 'r'$\pi=100$')
#Adding π in title of the figure
![Python | Adding Pi in Plot Label (2)](https://www.includehelp.com/python/images/adding-pi-in-plot-label-2.jpg)