.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "python_module/02_eddy_identification/pet_contour_circle.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. or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_python_module_02_eddy_identification_pet_contour_circle.py: Display contour & circle ======================== .. GENERATED FROM PYTHON SOURCE LINES 6-12 .. code-block:: Python from matplotlib import pyplot as plt from py_eddy_tracker import data from py_eddy_tracker.observations.observation import EddiesObservations .. GENERATED FROM PYTHON SOURCE LINES 13-14 Load detection files .. GENERATED FROM PYTHON SOURCE LINES 14-16 .. code-block:: Python a = EddiesObservations.load_file(data.get_demo_path("Anticyclonic_20190223.nc")) .. GENERATED FROM PYTHON SOURCE LINES 17-18 Plot the speed and effective (dashed) contours .. GENERATED FROM PYTHON SOURCE LINES 18-29 .. code-block:: Python fig = plt.figure(figsize=(15, 8)) ax = fig.add_axes((0.05, 0.05, 0.9, 0.9)) ax.set_aspect("equal") ax.set_xlim(10, 70) ax.set_ylim(-50, -25) a.display(ax, label="Anticyclonic contour", color="r", lw=1) # Replace contours by circles using center and radius (effective is dashed) a.circle_contour() a.display(ax, label="Anticyclonic circle", color="g", lw=1) _ = ax.legend(loc="upper right") .. image-sg:: /python_module/02_eddy_identification/images/sphx_glr_pet_contour_circle_001.png :alt: pet contour circle :srcset: /python_module/02_eddy_identification/images/sphx_glr_pet_contour_circle_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.617 seconds) .. _sphx_glr_download_python_module_02_eddy_identification_pet_contour_circle.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/AntSimi/py-eddy-tracker/master?urlpath=lab/tree/notebooks/python_module/02_eddy_identification/pet_contour_circle.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: pet_contour_circle.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: pet_contour_circle.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: pet_contour_circle.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_