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 95cbca4

Browse filesBrowse files
committed
Merge pull request #6461 from jenshnielsen/fixhillshading
DOC: Use interpolation on hill shading examples.
2 parents 3df2df1 + 7714985 commit 95cbca4
Copy full SHA for 95cbca4

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/specialty_plots/advanced_hillshading.py

Copy file name to clipboardExpand all lines: examples/specialty_plots/advanced_hillshading.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def display_colorbar():
1616
rgb = ls.shade(z, cmap)
1717

1818
fig, ax = plt.subplots()
19-
ax.imshow(rgb)
19+
ax.imshow(rgb, interpolation='bilinear')
2020

2121
# Use a proxy artist for the colorbar...
2222
im = ax.imshow(z, cmap=cmap)
@@ -39,11 +39,11 @@ def avoid_outliers():
3939
fig, (ax1, ax2) = plt.subplots(ncols=2, figsize=(8, 4.5))
4040

4141
rgb = ls.shade(z, plt.cm.copper)
42-
ax1.imshow(rgb)
42+
ax1.imshow(rgb, interpolation='bilinear')
4343
ax1.set_title('Full range of data')
4444

4545
rgb = ls.shade(z, plt.cm.copper, vmin=-10, vmax=10)
46-
ax2.imshow(rgb)
46+
ax2.imshow(rgb, interpolation='bilinear')
4747
ax2.set_title('Manually set range')
4848

4949
fig.suptitle('Avoiding Outliers in Shaded Plots', size='x-large')
@@ -62,7 +62,7 @@ def shade_other_data():
6262
rgb = ls.shade_rgb(cmap(norm(z2)), z1)
6363

6464
fig, ax = plt.subplots()
65-
ax.imshow(rgb)
65+
ax.imshow(rgb, interpolation='bilinear')
6666
ax.set_title('Shade by one variable, color by another', size='x-large')
6767

6868
display_colorbar()

0 commit comments

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