{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Example plot using stripes\n\nPlot up climate stripes plots from already\nexisting climatologies from ARM data.\nAuthor: Adam Theisen\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n\nimport act\n\n# SGP E13 MET data has already been processed to yearly averages,\n# removing data flagged by embedded qc and DQRs\nurl = 'https://raw.githubusercontent.com/AdamTheisen/ARM-Climatologies/refs/heads/main/results/sgpmetE13.b1_temp_mean_Y.csv'\ncol_names = ['time', 'temperature', 'count']\nds = act.io.read_csv(url, column_names=col_names, index_col=0, parse_dates=True)\n\n# Drop years with less than 500000 samples\nds = ds.where(ds['count'] > 500000)\n\n# Create plot display\ndisplay = act.plotting.TimeSeriesDisplay(ds, figsize=(10, 2))\nreference = ['2003-01-01', '2013-01-01']\ndisplay.plot_stripes('temperature', reference_period=reference)\n\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 }