[英]Pandas Time Series Plot: Secondary y-Axis Label , Set Lower Limit
[英]How to add a y-axis label while using pandas.DataFrame.plot() for constructing a time series plot
這是我的代碼。 我查看了文檔,但沒有找到答案。
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime
avs = pd.read_csv('daily_2004_2014.csv')
avs = avs.set_index(pd.DatetimeIndex(avs['Date']))
fig = plt.figure()
avs.plot()
plt.show()
繪圖功能返回軸。
axes = avs.plot()
然后,您可以按任意方式編輯軸。 就你而言
axes.set_ylabel('Desired Label')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.