Skip to main content
 首页 » 编程设计

python之如何添加matplotlib轴单位

2024年11月24日8cyq1162

<分区>

我有以下代码:

import matplotlib.pyplot as plt 
x = [i * 2872155 for i in range(1, 11)] 
y = [0.219, 0.402,  0.543,  0.646,0.765,  0.880,1.169, 1.358,1.492,1.611] 
plt.plot(x, y) 

情节是

但我希望 y 标签为 0.2s、0.4s、0.6s。 我该怎么做?