I'm trying to plot a panelplot with multiple boxplots from data in pandas dataframe. The columns of dataframe look like this:
data.columns
Index([u'SiteId', u'obs1', u'obs2', u'obs3', u'obs4', u'obs5', u'obs6', u'date', u'area']
I want to create a panel of 9 different plots (since there are 9 distinct geographical areas) each of which has 12 boxplots for each month of the year. An example is shown below with the snippet used to create the plot:
df = data.ix[:, ['obs1','date', 'area']]
df = df.set_index('date')
colm = ['LOCATION 1']
for area in areas:
df2 = df.loc[(df.area== area)]
df2.boxplot(column=colm, by=df2.index.month, showmeans=True)
the above code results in the only one figure (with boxplots corresponding to each month in the figure), but I want to create 9 such plots each corresponding to a particular area as subplots in the same plot. In other words, I want to first group the data by area, then by month of the year and then plot the result as boxplot. Any thoughts how I can get the desired plots? Any help is appreciated.
Also, how can I get rid of the "Boxplot grouped by [1 1 1 ...12 12 12]" and "1,1,1,1,1,1,1,1,1,....." both at the top and bottom of the plot?
I can't post images since stackoverflow rules don't allow me to. Thanks.