Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0a6febf

Browse filesBrowse files
meeseeksmachinetacaswell
authored andcommitted
Backport PR #12785: Use level kwargs in irregular contour example (#12786)
1 parent 462d131 commit 0a6febf
Copy full SHA for 0a6febf

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎examples/images_contours_and_fields/irregulardatagrid.py

Copy file name to clipboardExpand all lines: examples/images_contours_and_fields/irregulardatagrid.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
#zi = griddata((x, y), z, (xi[None,:], yi[:,None]), method='linear')
5858

5959

60-
ax1.contour(xi, yi, zi, 14, linewidths=0.5, colors='k')
61-
cntr1 = ax1.contourf(xi, yi, zi, 14, cmap="RdBu_r")
60+
ax1.contour(xi, yi, zi, levels=14, linewidths=0.5, colors='k')
61+
cntr1 = ax1.contourf(xi, yi, zi, levels=14, cmap="RdBu_r")
6262

6363
fig.colorbar(cntr1, ax=ax1)
6464
ax1.plot(x, y, 'ko', ms=3)
@@ -73,8 +73,8 @@
7373
# Directly supply the unordered, irregularly spaced coordinates
7474
# to tricontour.
7575

76-
ax2.tricontour(x, y, z, 14, linewidths=0.5, colors='k')
77-
cntr2 = ax2.tricontourf(x, y, z, 14, cmap="RdBu_r")
76+
ax2.tricontour(x, y, z, levels=14, linewidths=0.5, colors='k')
77+
cntr2 = ax2.tricontourf(x, y, z, levels=14, cmap="RdBu_r")
7878

7979
fig.colorbar(cntr2, ax=ax2)
8080
ax2.plot(x, y, 'ko', ms=3)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.