<jupyter_start><jupyter_text>Cross section plots This example demonstrates contour plots of a cross-sectioned multi-dimensional cube which features a hybrid height vertical coordinate system.<jupyter_code>import iris

fname = iris.sample_data_path('hybrid_height.nc')
theta = iris.load_cube(fname, 'air_potential_temperature')<jupyter_output><empty_output><jupyter_text>Extract a single height vs longitude cross-section. N.B. This could easily be changed to extract a specific slice, or even to loop over *all* cross section slices.<jupyter_code>cross_section = next(theta.slices(['grid_longitude',
                                   'model_level_number']))<jupyter_output><empty_output><jupyter_text>Create the contour plot using the Iris quickplot utility functions<jupyter_code>%matplotlib inline
from matplotlib import rcParams
import iris.plot as iplt
import iris.quickplot as qplt

# Create slightly larger figures; Jupyter's default setting for Matplotlib figures is rather small
rcParams['figure.figsize'] = [12, 8]

qplt.contourf(cross_section, coords=['grid_longitude', 'altitude'],
              cmap='RdBu_r');<jupyter_output><empty_output><jupyter_text>Create the equivalent plot, only against model level<jupyter_code>qplt.contourf(cross_section,
              coords=['grid_longitude', 'model_level_number'],
              cmap='RdBu_r');<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08815028901734104, 'fraction_numerical': 0.002167630057803468, 'mean_word_length': 5.626794258373206, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '446719', 'license': 'Apache-2.0', 'n_tokens_mistral': 436, 'n_tokens_neox': 418, 'n_words': 107, 'path': 'examples/iris/cross-section.ipynb', 'repo_name': 'RETURN-project/eucp', 'size': '1384'}