Using pandas I create a plot of a time series like this:
import numpy as np
import pandas as pd
rng = pd.date_range('2016-01-01', periods=60, freq='D')
ts = pd.Series(np.random.randn(len(rng)), index=rng)
ax = ts.plot()
ax.axhline(y=ts.mean(), xmin=-1, xmax=1, color='r', linestyle='--', lw=2)
I would like to add another horizontal line at the level of the mean using only data from February. The mean is just ts.loc['2016-02'], but how do I add a horizontal line at that level that doesn't go across the whole figure, but only for the dates in February?
