[英]modify the x-axis labels in histogram plot using matplotlib
這里,
plt.xlim([-3, 3])
plt.ylim([-3, 3])
plt.yticks(np.arange(-3, 3, 0.5))
plt.xticks(np.arange(-3, 3, 0.5))
plt.show()
你會在 -3 到 3 的范圍內得到相距 0.5 的刻度。希望這會有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.