.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "source/auto_examples/plotting/plot_xsection.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_source_auto_examples_plotting_plot_xsection.py: Multidimensional cross sections ------------------------------- In this example, the VISST data are used to plot up cross-sectional slices through the multi-dimensional dataset .. GENERATED FROM PYTHON SOURCE LINES 9-65 .. image-sg:: /source/auto_examples/plotting/images/sphx_glr_plot_xsection_001.png :alt: Infrared temperature average, Infrared temperature average, Infrared temperature average, Infrared temperature average :srcset: /source/auto_examples/plotting/images/sphx_glr_plot_xsection_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/runner/work/ACT/ACT/act/plotting/plot.py:81: UserWarning: Could not discern datastreamname and dict or tuple were not provided. Using defaultname of act_datastream! warnings.warn( | .. code-block:: Python from arm_test_data import DATASETS import matplotlib.pyplot as plt import act filename_visst = DATASETS.fetch('twpvisstgridirtemp.c1.20050705.002500.nc') my_ds = act.io.arm.read_arm_netcdf(filename_visst) # Cross section display requires that the variable being plotted be reduced to two # Dimensions whose coordinates can be specified by variables in the file display = act.plotting.XSectionDisplay(my_ds, figsize=(20, 8), subplot_shape=(2, 2)) display.plot_xsection_map( 'ir_temperature', None, x='longitude', y='latitude', cmap='Greys', vmin=200, vmax=320, subplot_index=(0, 0), ) display.plot_xsection_map( 'ir_temperature', None, x='longitude', y='latitude', cmap='Greys', vmin=200, vmax=320, subplot_index=(1, 0), ) display.plot_xsection_map( 'ir_temperature', None, x='longitude', y='latitude', cmap='Greys', vmin=200, vmax=320, subplot_index=(0, 1), ) display.plot_xsection_map( 'ir_temperature', None, x='longitude', y='latitude', cmap='Greys', vmin=200, vmax=320, subplot_index=(1, 1), ) plt.show() my_ds.close() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.442 seconds) .. _sphx_glr_download_source_auto_examples_plotting_plot_xsection.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_xsection.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_xsection.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_xsection.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_