{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Multidimensional cross sections\n\nIn this example, the VISST data are used to\nplot up cross-sectional slices through the\nmulti-dimensional dataset\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\nfrom arm_test_data import DATASETS\n\nimport act\n\nfilename_visst = DATASETS.fetch('twpvisstgridirtemp.c1.20050705.002500.nc')\nmy_ds = act.io.arm.read_arm_netcdf(filename_visst)\n\n# Cross section display requires that the variable being plotted be reduced to two\n# Dimensions whose coordinates can be specified by variables in the file\ndisplay = act.plotting.XSectionDisplay(my_ds, figsize=(20, 8), subplot_shape=(2, 2))\ndisplay.plot_xsection_map(\n 'ir_temperature',\n None,\n x='longitude',\n y='latitude',\n cmap='Greys',\n vmin=200,\n vmax=320,\n subplot_index=(0, 0),\n)\ndisplay.plot_xsection_map(\n 'ir_temperature',\n None,\n x='longitude',\n y='latitude',\n cmap='Greys',\n vmin=200,\n vmax=320,\n subplot_index=(1, 0),\n)\ndisplay.plot_xsection_map(\n 'ir_temperature',\n None,\n x='longitude',\n y='latitude',\n cmap='Greys',\n vmin=200,\n vmax=320,\n subplot_index=(0, 1),\n)\ndisplay.plot_xsection_map(\n 'ir_temperature',\n None,\n x='longitude',\n y='latitude',\n cmap='Greys',\n vmin=200,\n vmax=320,\n subplot_index=(1, 1),\n)\n\nplt.show()\nmy_ds.close()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.14.3" } }, "nbformat": 4, "nbformat_minor": 0 }