It appears as though the default behavior of savefig in PdfPages will save a vectorized image (each data point is an object) leading to large file size and slow loading/rendering. Can we save a rasterized image (e.g. PNG) so that it renders quickly?
This is what I'm doing now, that results in vector images:
plt.ioff()
with PdfPages(foutname) as pdf:
for row in df.itertuples():
data = ReadFile(df.fname)
plt.clf()
plt.plot(data['time'], data['voltage'], 'bo')
pdf.savefig()
plt.close()
Thanks.