{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Plot a timeseries of sounding data\n\nThis is a simple example for how to plot multiple columns\nin a TimeseriesDisplay.\n\nAuthor: Maxwell Grover\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from arm_test_data import DATASETS\nfrom matplotlib import pyplot as plt\n\nimport act\n\n# Read in MET files.\nmet_wildcard_list = [\n 'sgpmetE13.b1.20190101.000000.cdf',\n 'sgpmetE13.b1.20190102.000000.cdf',\n 'sgpmetE13.b1.20190103.000000.cdf',\n 'sgpmetE13.b1.20190104.000000.cdf',\n 'sgpmetE13.b1.20190105.000000.cdf',\n 'sgpmetE13.b1.20190106.000000.cdf',\n 'sgpmetE13.b1.20190107.000000.cdf',\n]\nmet_filenames = [DATASETS.fetch(file) for file in met_wildcard_list]\nmet_ds = act.io.arm.read_arm_netcdf(met_filenames)\n\n\n# Plot data\ndisplay = act.plotting.TimeSeriesDisplay(met_ds)\ndisplay.add_subplots((3, 2), figsize=(15, 10))\ndisplay.plot('temp_mean', color='tab:red', subplot_index=(0, 0))\ndisplay.plot('rh_mean', color='tab:green', subplot_index=(1, 0))\ndisplay.plot('wdir_vec_mean', subplot_index=(2, 0))\ndisplay.plot('temp_std', color='tab:red', subplot_index=(0, 1))\ndisplay.plot('rh_std', color='tab:green', subplot_index=(1, 1))\ndisplay.plot('wdir_vec_std', subplot_index=(2, 1))\nplt.show()" ] } ], "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 }