.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_subplots.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_subplots.py: Rendering onto Existing Axes ============================= Render memes side-by-side using matplotlib's subplot system. .. GENERATED FROM PYTHON SOURCE LINES 9-14 Side-by-Side Memes -------------------- Pass an existing ``Axes`` via the ``ax`` parameter to embed a meme in a subplot layout. .. GENERATED FROM PYTHON SOURCE LINES 14-24 .. code-block:: Python import matplotlib.pyplot as plt import memeplotlib as memes fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(16, 6)) memes.meme("buzz", "memes", "memes everywhere", ax=ax1, show=False) memes.meme("doge", "such code", "very bug", ax=ax2, show=False) plt.tight_layout() .. image-sg:: /auto_examples/images/sphx_glr_plot_subplots_001.png :alt: plot subplots :srcset: /auto_examples/images/sphx_glr_plot_subplots_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.418 seconds) .. _sphx_glr_download_auto_examples_plot_subplots.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_subplots.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_subplots.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_subplots.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_