.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/map_plots/map_plot_no_data.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_examples_map_plots_map_plot_no_data.py: Creating a map plot with no data -------------------------------- The following example shows how to use the map features in EMCPy. The map feature underlying source code comes from `Cartopy`. .. GENERATED FROM PYTHON SOURCE LINES 9-34 .. image-sg:: /examples/map_plots/images/sphx_glr_map_plot_no_data_001.png :alt: map plot no data :srcset: /examples/map_plots/images/sphx_glr_map_plot_no_data_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt from emcpy.plots import CreatePlot, CreateFigure from emcpy.plots.map_tools import Domain, MapProjection def main(): # Create global map with no data using # PlateCarree projection and coastlines plot1 = CreatePlot() plot1.projection = 'plcarr' plot1.domain = 'global' plot1.add_map_features(['coastline', 'land', 'ocean']) plot1.add_xlabel(xlabel='longitude') plot1.add_ylabel(ylabel='latitude') fig = CreateFigure() fig.plot_list = [plot1] fig.create_figure() plt.show() if __name__ == '__main__': main() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.457 seconds) .. _sphx_glr_download_examples_map_plots_map_plot_no_data.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: map_plot_no_data.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: map_plot_no_data.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_