Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matplotlib 3.8+ compatibility - positional to keyword args and contour label specification fixes #579

Merged
merged 3 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Gallery/Polygons/NCL_polyg_19.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,19 @@ def plotRegion(region, axis, xlim, puertoRico, waterBody):
color = findDivColor(colorbounds, pop)
# Set characteristics and measurements of each filled polygon "patch"
patches.append(
Polygon(np.vstack((x, y)).T, True, color=color, linewidth=0.1))
Polygon(np.vstack((x, y)).T,
closed=True,
color=color,
linewidth=0.1))

# If the region being plotted is a body of water with no population
else:
# Set characteristics and measurements of each filled polygon "patch"
water_patches.append(
Polygon(np.vstack((x, y)).T, True, color='white', linewidth=.7))
Polygon(np.vstack((x, y)).T,
closed=True,
color='white',
linewidth=.7))

pc = PatchCollection(patches,
match_original=True,
Expand Down
1 change: 0 additions & 1 deletion Gallery/Polygons/NCL_polyg_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def make_base_plot():
]
ax.clabel(
hdl,
np.arange(-8, 24, 8), # Only label these contour levels: [-8, 0, 8, 16]
fontsize="small",
colors="black",
fmt="%.0f", # Turn off decimal points
Expand Down
Loading