日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python 添加图例_Python | 在图例标签中添加Sigma

發(fā)布時間:2025/3/11 python 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python 添加图例_Python | 在图例标签中添加Sigma 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

python 添加圖例

Sigma (𝜎) is very often used greek mathematical letters and has a higher repetition in probability. In this article, we are going to add 𝜎 using a command in matplotlib.

Sigma(𝜎)是希臘數(shù)學字母中經(jīng)常使用的字母,其重復率更高。 在這篇文章中,我們將添加σ在matplotlib使用命令。

plt.text(3, 0.4, r'$\sigma=100$') #Adding 𝜎 as text plt.title('Errorbar with 'r'$\sigma=100$') #Adding 𝜎 in title of the figure plt.xlabel('Time ('r'$\sigma=100)$') #Adding 𝜎 in title of the figure plt.ylabel('Variation ('r'$\sigma=100)$') #Adding 𝜎 in title of the figure

在情節(jié)標簽中添加omega的Python代碼 (Python code for adding omega in plot label)

import numpy as np import matplotlib.pyplot as pltx = np.arange(0.1, 5, 0.1) y = np.sin(x)*np.exp(-x)# In text plt.figure() plt.plot(x,y, 'o', color='purple') plt.title('Errorbar') plt.text(4, 0.0, r'$\sigma=100$') plt.grid() plt.show()# In title plt.figure() plt.plot(x,y, 'o', color='purple') plt.title('Plotting with 'r'$\sigma=100$') plt.grid() plt.show()# In x-axis label plt.figure() plt.plot(x,y, 'o', color='purple') plt.xlabel('Time ('r'$\sigma=100)$') plt.grid() plt.show()# In y-axis label plt.figure() plt.plot(x,y, 'o', color='purple') plt.ylabel('Function ('r'$\sigma=100)$') plt.grid() plt.show()

Output:

輸出:

Output is as figure

翻譯自: https://www.includehelp.com/python/adding-sigma-in-plot-label.aspx

python 添加圖例

總結(jié)

以上是生活随笔為你收集整理的python 添加图例_Python | 在图例标签中添加Sigma的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。