.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/plots/US_Counties.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_plots_US_Counties.py: =========== US Counties =========== Demonstrate how to plot US counties at all three available resolutions. .. GENERATED FROM PYTHON SOURCE LINES 11-16 .. code-block:: Python import cartopy.crs as ccrs import matplotlib.pyplot as plt from metpy.plots import USCOUNTIES .. GENERATED FROM PYTHON SOURCE LINES 17-28 .. code-block:: Python proj = ccrs.LambertConformal(central_longitude=-85.0, central_latitude=45.0) fig = plt.figure(figsize=(12, 9)) ax1 = fig.add_subplot(1, 3, 1, projection=proj) ax2 = fig.add_subplot(1, 3, 2, projection=proj) ax3 = fig.add_subplot(1, 3, 3, projection=proj) for scale, axis in zip(['20m', '5m', '500k'], [ax1, ax2, ax3]): axis.set_extent([270.25, 270.9, 38.15, 38.75], ccrs.Geodetic()) axis.add_feature(USCOUNTIES.with_scale(scale)) .. image-sg:: /examples/plots/images/sphx_glr_US_Counties_001.png :alt: US Counties :srcset: /examples/plots/images/sphx_glr_US_Counties_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.517 seconds) .. _sphx_glr_download_examples_plots_US_Counties.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: US_Counties.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: US_Counties.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_