Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Oct 19, 2023
1 parent 09330fe commit e38db53
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions notebooks/wp5/ocean_color_timeseries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,21 @@
" \"MERIS\": [\"2002-03-01\", \"2012-04-30\"],\n",
" }\n",
" for i, (mission, xlims) in enumerate(missions.items()):\n",
" xlims = pd.to_datetime(xlims).tolist()\n",
" facecolor = matplotlib.colors.colorConverter.to_rgba(f\"C{i}\", alpha=0.2)\n",
" edgecolor = matplotlib.colors.colorConverter.to_rgba(f\"C{i}\", alpha=1)\n",
" plt.axvspan(\n",
" *pd.to_datetime(xlims).tolist(),\n",
" facecolor=matplotlib.colors.colorConverter.to_rgba(f\"C{i}\", alpha=0.2),\n",
" edgecolor=matplotlib.colors.colorConverter.to_rgba(f\"C{i}\", alpha=1),\n",
" *xlims,\n",
" facecolor=facecolor,\n",
" edgecolor=edgecolor,\n",
" lw=1.5,\n",
" ls=\"--\",\n",
" label=mission,\n",
" )\n",
"\n",
" # Final settings\n",
" ax.set_ylim(da.quantile([0.01, 0.99]).values.tolist())\n",
" plt.legend()\n",
" plt.legend(loc=\"top left\", bbox_to_anchor=(1, 1))\n",
" plt.grid()\n",
" return fig, ax"
]
Expand Down

0 comments on commit e38db53

Please sign in to comment.