3
所以我一直在SE上搜索一段時間,沒有找到任何工作.....我有一個多年來的最低和最高溫度的數據幀。如何更改滴答數量?
plt.figure()
plt.gca().fill_between(range(len(Tmin)), Tmin, Tmax, facecolor='blue', alpha=0.25)
plt.plot(range(365), Tmin, 'b', range(365), Tmax, 'r')
plt.locator_params(axis = 'x', nbins = 12)
x = plt.gca().xaxis
m = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
ax = plt.gca()
ax.locator_params(axis = 'x', nbins = 12)
ax.set_xticklabels(m)
ax.set_ylabel('T(C)')
ax.set_title('Temperature')
plt.xlim([0,365])
# ax.set_xticks(np.linspace(0,1,12))
plt.show()
它仍然相同數目的滴答輸出作爲原始情節,其中x軸是[0,50,100,...,350]
不錯!謝謝:)你會碰巧也知道爲什麼我不能移動我的傳奇任何機會? : Raksha