Closed
Description
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
df = pd.DataFrame(np.random.randn(6, 4), index=pd.date_range('20150101', periods=6), columns=list('ABCD'))
plotters = [
"df.plot()",
"df.plot(legend=None)",
"df.plot(legend=None, subplots=True, layout=(2, 2))",
"df['A'].plot(legend=None)",
"df['A'].plot(legend=None, subplots=True)"
]
for i, plotter in enumerate(plotters, 1):
eval(plotter)
plt.title(plotter)
plt.savefig('%d.png' % i)
plt.close('all')
Also, notice how the title is broken in the third image.