I am trying to get my head around matplotlib's state machine model, but I am running into an error when trying to plot multiple lines on a single plot. From what I understand, the following code should produce a single plot with two lines:
import pandas as pd
import pandas.io.data as web
aapl = web.get_data_yahoo('AAPL', '1/1/2005')# extract adjusted close
adj_close = aapl.loc[:, ['Adj Close']]# 2 lines on one plot
hold(False)
adj_close.resample('M', how='min').plot()
adj_close.resample('M', how='max').plot()
In fact, I get three figures: first a blank one, and then two with one line each.
Any idea what I am doing wrong or what setting on my system might be misconfigured?