.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_tephigram.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_plot_tephigram.py: The Tephigram ============= The bare diagram: the five :term:`isopleth` families of a :term:`tephigram`, on a coordinate system rotated so that the :term:`isotherm` and :term:`dry adiabat` families cross at right angles. The :term:`projection` is registered by importing tephpy, and the extent is given as a pressure range and a temperature range. .. GENERATED FROM PYTHON SOURCE LINES 15-48 .. image-sg:: /gallery/images/sphx_glr_plot_tephigram_001.png :alt: Tephigram :srcset: /gallery/images/sphx_glr_plot_tephigram_001.png :class: sphx-glr-single-img .. code-block:: Python from __future__ import annotations from typing import TYPE_CHECKING import matplotlib.pyplot as plt import tephpy # registers the "tephigram" projection if TYPE_CHECKING: from matplotlib.figure import Figure def main() -> Figure: """Draw a tephigram over a chosen extent. Returns ------- matplotlib.figure.Figure The composed figure. """ fig, ax = plt.subplots(figsize=(8.0, 4.0), subplot_kw={"projection": "tephigram"}) # The ranges the diagram already frames itself with, restated so the # example shows how to reframe it. `tests/examples` pins them to the # default, so a change to that default cannot leave this figure behind. ax.set_extent(pressure=(900.0, 200.0), temperature=(-65.0, 5.0)) ax.set_title("Tephigram") return fig if __name__ == "__main__": main() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.176 seconds) .. rst-class:: sphx-glr-example-tags 🏷 Tags: diagram, isopleths .. _sphx_glr_download_gallery_plot_tephigram.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_tephigram.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_tephigram.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_tephigram.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_