简体   繁体   English

如何隐藏第一个y轴值?

[英]How to hide first y-axis value?

I'm trying to plot this chart, but I don't find the first y-axis value ( 0.0 ) useful. 我正在尝试绘制此图表,但我没有发现第一个y轴值( 0.0 )有用。 How to "skip" it? 如何“跳过”它?

Chart 图表

import matplotlib.pyplot as plt

x = range(0, 1100, 100)
y = [0.025, 0.508, 0.547, 0.566, 0.58, 0.59, 0.6, 0.605, 0.608, 0.615, 0.620]

plt.plot(x, y)

plt.xticks(range(0, 1100, 100))
plt.grid()

plt.show()

在这种特定情况下,这将做:

plt.yticks(plt.yticks()[0][2:])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM