Skip to content

Commit

Permalink
Update test_008_waterschappen.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rubencalje committed Jun 23, 2023
1 parent b75f83a commit 18db5c5
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/test_008_waterschappen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

import pytest

import matplotlib
import nlmod


Expand Down Expand Up @@ -48,13 +48,23 @@ def test_download_peilgebieden(plot=True):

if plot:
# plot the winter_stage
ax = waterboards.plot(edgecolor="k", facecolor="none")
f, ax = nlmod.plot.get_map([9000, 279000, 304000, 623000], base=100000)
waterboards.plot(edgecolor="k", facecolor="none", ax=ax)
norm = matplotlib.colors.Normalize(-10.0, 20.0)
cmap = "viridis"
for wb in waterboards.index:
if wb in gdf:
# gdf[wb].plot(ax=ax, zorder=0)
gdf[wb].plot("winter_stage", ax=ax, zorder=0, vmin=-10, vmax=20)
gdf[wb].plot("winter_stage", ax=ax, zorder=0, norm=norm, cmap=cmap)
c = waterboards.at[wb, "geometry"].centroid
ax.text(c.x, c.y, wb.replace(" ", "\n"), ha="center", va="center")
nlmod.plot.colorbar_inside(
ax=ax,
norm=norm,
cmap=cmap,
bounds=[0.05, 0.55, 0.02, 0.4],
label="Summer stage (m NAP)",
)


@pytest.mark.skip("too slow")
Expand Down

0 comments on commit 18db5c5

Please sign in to comment.