{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Plot a histogram of Met data.\n\nThis is a simple example for how to plot a histogram\nof Meteorological data, while using hist_kwargs parameter.\n\nAuthor: Zachary Sherman\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\nfrom arm_test_data import DATASETS\nfrom matplotlib import pyplot as plt\n\nimport act\n\nfilename_met = DATASETS.fetch('sgpmetE13.b1.20190101.000000.cdf')\nmet_ds = act.io.arm.read_arm_netcdf(filename_met)\n\n# Plot data\nhist_kwargs = {'range': (-10, 10)}\nhistdisplay = act.plotting.DistributionDisplay(met_ds)\nhistdisplay.plot_stacked_bar('temp_mean', bins=np.arange(-40, 40, 5), hist_kwargs=hist_kwargs)\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 }