.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery_examples/maps/plot_maps.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_gallery_examples_maps_plot_maps.py: .. _example_plot_maps: Plot several maps ################# Example showing how to plot several fits map files with MadcubaMap using :func:`~madcubapy.visualization.add_wcs_axes`. We can add as many subplots as needed following the same convention used for matplotlib's :meth:`~matplotlib.figure.Figure.add_subplot`: *nrows*, *ncols*, *number* right after the `~matplotlib.figure.Figure` that we want to use. .. GENERATED FROM PYTHON SOURCE LINES 16-35 .. image-sg:: /gallery_examples/maps/images/sphx_glr_plot_maps_001.png :alt: IRAS16293_SO_2-1_moment0_madcuba.fits, IRAS16293_SO_2-1_moment0_madcuba.fits :srcset: /gallery_examples/maps/images/sphx_glr_plot_maps_001.png :class: sphx-glr-single-img .. code-block:: Python from madcubapy.io import MadcubaMap from madcubapy.visualization import add_wcs_axes import matplotlib.pyplot as plt # Read fits file madcuba_map = MadcubaMap.read("../data/IRAS16293_SO_2-1_moment0_madcuba.fits") # Create empty figure fig = plt.figure(figsize=(10,5)) # Add as many WCS axes objects as desired. # We can pass kwargs for matplotlib.pyploy.imshow() ax1, img1 = add_wcs_axes(fig, 1, 2, 1, fitsmap=madcuba_map, vmin=0, vmax=100) ax2, img2 = add_wcs_axes(fig, 1, 2, 2, fitsmap=madcuba_map, vmin=0, vmax=100, cmap='jet') plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.183 seconds) .. _sphx_glr_download_gallery_examples_maps_plot_maps.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_maps.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_maps.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_maps.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_