8000 Merge pull request #23930 from baharev/main · matplotlib/matplotlib@f44e70e · GitHub
[go: up one dir, main page]

Skip to content

Commit f44e70e

Browse files
authored
Merge pull request #23930 from baharev/main
Fix edge color, links, wording; closes #23895
2 parents ec85e72 + ff7c43a commit f44e70e

File tree

2 files changed

+18
-22
lines changed

2 files changed

+18
-22
lines changed

examples/mplot3d/contour3d_3.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
"""
2-
========================================
3-
Projecting contour profiles onto a graph
4-
========================================
5-
2+
=====================================
3+
Project contour profiles onto a graph
4+
=====================================
65
Demonstrates displaying a 3D surface while also projecting contour 'profiles'
76
onto the 'walls' of the graph.
8-
9-
See contourf3d_demo2 for the filled version.
7+
See :doc:`contourf3d_2` for the filled version.
108
"""
119

1210
from mpl_toolkits.mplot3d import axes3d
1311
import matplotlib.pyplot as plt
14-
from matplotlib import cm
1512

1613
ax = plt.figure().add_subplot(projection='3d')
1714
X, Y, Z = axes3d.get_test_data(0.05)
1815

1916
# Plot the 3D surface
20-
ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
17+
ax.plot_surface(X, Y, Z, edgecolor='royalblue', lw=0.5, rstride=8, cstride=8,
18+
alpha=0.3)
2119

2220
# Plot projections of the contours for each dimension. By choosing offsets
2321
# that match the appropriate axes limits, the projected contours will sit on
2422
# the 'walls' of the graph.
25-
ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
26-
ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
27-
ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)
23+
ax.contour(X, Y, Z, zdir='z', offset=-100, cmap='coolwarm')
24+
ax.contour(X, Y, Z, zdir='x', offset=-40, cmap='coolwarm')
25+
ax.contour(X, Y, Z, zdir='y', offset=40, cmap='coolwarm')
2826

2927
ax.set(xlim=(-40, 40), ylim=(-40, 40), zlim=(-100, 100),
3028
xlabel='X', ylabel='Y', zlabel='Z')

examples/mplot3d/contourf3d_2.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
"""
2-
======================================
3-
Projecting filled contour onto a graph
4-
======================================
5-
2+
===================================
3+
Project filled contour onto a graph
4+
===================================
65
Demonstrates displaying a 3D surface while also projecting filled contour
76
'profiles' onto the 'walls' of the graph.
8-
9-
See contour3d_demo2 for the unfilled version.
7+
See :doc:`contour3d_3` for the unfilled version.
108
"""
119

1210
from mpl_toolkits.mplot3d import axes3d
1311
import matplotlib.pyplot as plt
14-
from matplotlib import cm
1512

1613
ax = plt.figure().add_subplot(projection='3d')
1714
X, Y, Z = axes3d.get_test_data(0.05)
1815

1916
# Plot the 3D surface
20-
ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
17+
ax.plot_surface(X, Y, Z, edgecolor='royalblue', lw=0.5, rstride=8, cstride=8,
18+
alpha=0.3)
2119

2220
# Plot projections of the contours for each dimension. By choosing offsets
2321
# that match the appropriate axes limits, the projected contours will sit on
2422
# the 'walls' of the graph
25-
ax.contourf(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
26-
ax.contourf(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
27-
ax.contourf(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)
23+
ax.contourf(X, Y, Z, zdir='z', offset=-100, cmap='coolwarm')
24+
ax.contourf(X, Y, Z, zdir='x', offset=-40, cmap='coolwarm')
25+
ax.contourf(X, Y, Z, zdir='y', offset=40, cmap='coolwarm')
2826

2927
ax.set(xlim=(-40, 40), ylim=(-40, 40), zlim=(-100, 100),
3028
xlabel='X', ylabel='Y', zlabel='Z')

0 commit comments

Comments
 (0)
0