10 年以上の時系列があり、xtick ラベルを 2 桁の年に省略したいと考えています。どうやってやるの ?
import matplotlib.pyplot as plt
import datetime as dt
import pandas as pd
import pandas.io.data as web
stocklist = ['MSFT']
# read historical prices for last 11 years
def get_px(stock, start):
return web.get_data_yahoo(stock, start)['Adj Close']
today = dt.date.today()
start = str(dt.date(today.year-11, today.month, today.day))
px = pd.DataFrame({n: get_px(n, start) for n in stocklist})
plt.plot(px.index, px[stocklist[0]])
plt.show()