def drawDf(pl, df, title=''): pl.figure if title != '': if agl.is_utf8(title): title = title.decode('utf8') #pl.title(title, fontproperties=getFont()) if not isinstance(df, type(None)): pl.rc('font', family='simhei') df.plot(title=title) pl.show() pl.close()
def drawTwoDf(pl, df1, df2, title=''): """分别画两个df""" pl.figure pl.rc('font', family='simhei') if title != '': if agl.is_utf8(title): title = title.decode('utf8') fig = pl.gcf() ax1 = fig.add_subplot(211) df1.plot(ax=ax1, title=title) ax2 = fig.add_subplot(212) df2.plot(ax=ax2) pl.show() pl.close()