x軸に「1:00 2:00 3:00 4:00 」と表示させたいのですが、どのようにすればよいか教えてください!
Time,a,b,c,d,e,f 1:00,27,27.4,27.7,27.4,27.3,27.2 2:00,26.8,27.1,27.5,27.4,27,26.9 3:00,26.6,27,27.3,27,26.8,26.6 4:00,26.5,26.7,27,26.7,26.6,26.4 5:00,26.5,26.7,26.9,26.7,26.5,26.3 6:00,27.4,27.4,28.2,28.1,27.6,26.6 7:00,28.4,28.6,30.5,30.9,30,27.9 8:00,30.4,30.4,32.7,33,32.4,29.6 9:00,30.3,31.7,34.4,34,34,32 10:00,30.7,32.4,34.3,34.6,34.3,33.8 11:00,31.7,32.4,32.8,34.2,35.3,34.6 12:00,32,33.3,34,34.6,34.1,34.5 13:00,30.9,33.7,34.2,34.4,33.9,35 14:00,31.6,33.3,33.8,33.5,33.8,34.9 15:00,30.9,33.3,33.6,33,33.2,34 16:00,30.5,32.8,33.1,32.3,32.4,34.1 17:00,29.4,31.3,31.8,31.3,32,33 18:00,28.6,29.8,30.4,29.9,30.6,31.9 19:00,27.9,29.1,29.3,29.3,29.6,30.7 20:00,27.4,28.3,28.5,28.7,28.9,29.6 21:00,27.3,28.4,28.3,28.5,28.6,29 22:00,27.1,28.1,28,28.3,28.3,28.6 23:00,27.2,27.7,27.8,27.9,28,28.1 0:00,26.9,27.8,27.7,27.7,27.7,27.6
import pandas as pd from matplotlib import pyplot as plt df = pd.read_csv("test80.csv", index_col="Time", parse_dates=["Time"]) ax = df.plot(figsize=(8, 5), title="Temperature Aug_01") ax.set_xlabel("Time") ax.set_ylabel("Temperature[℃]") ax.grid(axis="y", c="gainsboro", zorder=9) plt.savefig(r"sample.png", bbox_inches="tight") plt.show()
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/07/30 14:55