It sounds somewhat weird, but I need to save the Pandas console output string to png pics. For example:
>>> df sales net_pft
You have to use the figure returned by the DataFrame.plot() command:
DataFrame.plot()
ax = df.plot() fig = ax.get_figure() fig.savefig('asdf.png')