I'm fairly new to this, so there might be a very obvious answer to this. My apologies!
I'm plotting two histograms via a groubpy. I'd like my subplots to each have the same x and y labels and a common title. I understood that sharex=True would do the trick, but apparently not if I set the axis only after the df.hist. I've tried various versions of setting the xlabels and am lost now.
import pylab as pl
from pandas import *
histo_survived = df.groupby('Survived').hist(column='Age', sharex=True, sharey=True)
pl.title("Histogram of Ages")
pl.xlabel("Age")
pl.ylabel("Individuals")
So what I end up with is labels only for the subplot.
Out: <matplotlib.text.Text at 0x11a27ead0>
Any idea on how to solve this?
(Have to use pandas/python.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…