Skip to content

Commit 38cb2cc

Browse files
committed
Tweak streamplot plot_types example.
- zorders don't need to be explicitly set, the contour is already below the streamplot. - alpha=0.5 for the contour seems too faint IMO; fully opaque seems better?
1 parent 7b9200e commit 38cb2cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plot_types/arrays/streamplot.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020

2121
# plot:
2222
fig, ax = plt.subplots()
23+
ax.grid(False)
24+
2325
# contour stream function
24-
ax.contour(X, Y, Z, colors='C1', alpha=0.5, zorder=1, linewidths=3)
26+
ax.contour(X, Y, Z, colors='C1', linewidths=3)
2527
# plot stream plot
26-
ax.streamplot(X[1:, 1:], Y[1:, 1:], U, V, zorder=2)
28+
ax.streamplot(X[1:, 1:], Y[1:, 1:], U, V)
2729

2830
plt.show()

0 commit comments

Comments
 (0)