Skip to content

Instantly share code, notes, and snippets.

@evertrol
evertrol / pdfpages_oo.py
Last active February 10, 2016 03:49 — forked from marcelm/pdfpages_oo.py
Plot multiple figures into a single PDF with matplotlib, using the object-oriented interface
"""
Plot multiple figures into a single PDF with matplotlib, using the
object-oriented interface.
"""
from matplotlib.backends.backend_pdf import FigureCanvasPdf, PdfPages
from matplotlib.figure import Figure
import numpy as np
with PdfPages('multi.pdf') as pages:
for i in range(10):