I have a lengthy plot, composed o several horizontal subplots organized into a column.
When I call fig.savefig('what.pdf'), the resulting output file shows all the plots crammed onto a single page.
Question: is there a way to tell savefig to save on any number (possibly automatically determined) of pdf pages?
I'd rather avoid multiple files and then os.system('merge ...'), if possible.
I haven't tried myself, but in the matplolib faq there are some instruction to save plots in pdf in several pages.
I suspect that there is a more elegant way to do this, but one option is to use tempfiles or StringIO to avoid making traditional files on the system and then you can piece those together.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With