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

Remaining changes to support Matplotlib 3.10 #630

Merged
merged 3 commits into from
Dec 13, 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
5 changes: 2 additions & 3 deletions Gallery/Contours/NCL_coneff_11.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@
cmap='white') # Use white cmap to have a white background

# Set the colors for the hatches
for i, collection in enumerate(p.collections):
collection.set_edgecolor(colors[i % len(colors)])
collection.set_linewidth(0.)
p.set_edgecolors(colors)
p.set_linewidth(0.)

# Set linewidth of hatches
plt.rcParams['hatch.linewidth'] = 2.5
Expand Down
9 changes: 1 addition & 8 deletions Gallery/Contours/NCL_hov_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,7 @@
levels=np.arange(-6, 12, 2),
colors='black',
linestyles="-",
linewidths=.2)

# Set 0 level contour line to a thicker linewidth
# If you try to access the "levels" attribute of cs (cs.levels),
# the list of levels is: [-6, -4, -2, 0, 2, 4, 6, 8, 10]
# level 0 is at the 3rd index of that list, so those contour lines
# can be accessed at cs.collections[3]
cs.collections[3].set_linewidth(1)
linewidths=[.2, .2, .2, 1, .2, .2, .2, .2, .2])

# Label the contour levels -4, 0, and 4
cl = ax.clabel(cs, fmt='%d', levels=[-4, 0, 4])
Expand Down
Loading