I'd like to use a secondary y-axis for some boxplots in pandas, but it doesn't seem available.
import numpy as np
import pandas as pddata = np.random.random((10, 5))
data[:,-1] += 10 # offset one column
df = pd.DataFrame(data)
Now, using the default line plot it's easy enough to plot to a second y-axis:
df.plot(kind='line', secondary_y=[4])
But if I use boxplot style, it doesn't work:
df.plot(kind='box', secondary_y=[4])
Is there any way (maybe through matplotlib) I can get pandas to plot 2 axes for boxplot? Using the boxplot()
method would be preferable, but I'll take plot()
. Thanks.