{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Investigate Temperature Quantiles\n\nInvestigate Temperature Quantiles\nusing DistributionDisplay Violin Plots\n\nWritten: Joe O'Brien\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\nfrom act.io.icartt import read_icartt\n\n# Call the read_icartt function, which supports input\n# for ICARTT (v2.0) formatted files.\n# Example file is ARM Aerial Facility Navigation Data\nfilename_icartt = DATASETS.fetch('AAFNAV_COR_20181104_R0.ict')\nds = read_icartt(filename_icartt)\n\n# Create a DistributionDisplay object to compare fields\ndisplay = act.plotting.DistributionDisplay(ds)\n\n# Compare aircraft ground speed with ambient temperature\ndisplay.plot_violin(\n 'ambient_temp',\n positions=[1.0],\n)\n\ndisplay.plot_violin(\n 'total_temp',\n positions=[2.0],\n set_title='Aircraft Temperatures 2018-11-04',\n)\n\n# Update the tick information\ndisplay.axes[0].set_xticks([0.5, 1, 2, 2.5])\nticks = ['', 'Ambient Air\\nTemp', 'Total\\nTemperature', '']\ndisplay.axes[0].set_xticklabels(ticks)\n\n# Update the y-axis label\ndisplay.axes[0].set_ylabel('Temperature Observations [C]')\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 }