Skip to content

Commit

Permalink
fix gridliners
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed May 10, 2024
1 parent 32445ff commit 675c8b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions notebooks/wp5/era5_cerra_extremes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"import matplotlib.pyplot as plt\n",
"import xarray as xr\n",
"from c3s_eqc_automatic_quality_control import download, plot, utils\n",
"from cartopy.mpl.gridliner import Gridliner\n",
"\n",
"plt.style.use(\"seaborn-v0_8-notebook\")"
]
Expand Down Expand Up @@ -227,7 +228,8 @@
" plot.projected_map(da, projection=projection, vmin=vmin, vmax=vmax, cmap=\"turbo\")\n",
" plot_obj = plt.title(f\"{collection_id.split('-')[1].upper()} {title}\")\n",
" plot_obj.axes.set_extent(extent)\n",
" for gl in plot_obj.axes._gridliners:\n",
" gridliners = [a for a in plot_obj.axes.artists if isinstance(a, Gridliner)]\n",
" for gl in gridliners:\n",
" gl.x_inline = False\n",
" gl.xlabel_style = {\"rotation\": 0}\n",
" plt.show()"
Expand Down Expand Up @@ -284,7 +286,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 675c8b2

Please sign in to comment.