[英]Plotting with two different labels in X-axis in matplotlib
我有一個這樣的 dataframe -
我想為 y 軸上的每個日期tmax
和tmin
值設置 plot。 如何使用 matplotlib 執行此操作?
將Series.unstack
與DataFrame.plot
一起使用:
df['Data_Value'].unstack().plot()
或者使用DataFrame.plot.bar
:
df['Data_Value'].unstack().plot.bar()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.