Skip to content

Commit 67aa36e

Browse files
author
Manuel Jung
committed
# Das ist eine Kombination aus 2 Commits.
# Das ist die erste Commit-Beschreibung: Test streamplot maxlength feature. # Commit-Beschreibung #2 wird ausgelassen: # Added streamline maxlength test png baseline image.
1 parent c60bfe2 commit 67aa36e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/matplotlib/tests/test_streamplot.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ def test_masks_and_nans():
5757
plt.streamplot(X, Y, U, V, color=U, cmap=plt.cm.Blues)
5858

5959

60+
@image_comparison(baseline_images=['streamplot_maxlength_test_image'],
61+
extensions=['png'])
62+
def test_maxlength():
63+
x = np.linspace(-3.,3.,100)
64+
y = np.linspace(-3.,3.,100)
65+
X,Y = np.meshgrid(x,y)
66+
a = 0.1
67+
U = np.cos(a) * (-Y) - np.sin(a) * X
68+
V = np.sin(a) * (-Y) + np.cos(a) * X
69+
plt.streamplot(x, y, U, V, maxlength=10., start_points=[[0.,1.5]],
70+
linewidth=2,density=2)
71+
72+
6073
@cleanup
6174
def test_streamplot_limits():
6275
ax = plt.axes()

0 commit comments

Comments
 (0)