Skip to content

Commit

Permalink
Merge pull request #4356 from mscross/examples_streamplot_feat
Browse files Browse the repository at this point in the history
STY : update streamplot_demo_features.py style
  • Loading branch information
tacaswell committed Apr 22, 2015
2 parents 55f0fb3 + e36a734 commit c85c67b
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -16,13 +16,14 @@
V = 1 + X - Y**2
speed = np.sqrt(U*U + V*V)

plt.streamplot(X, Y, U, V, color=U, linewidth=2, cmap=plt.cm.autumn)
plt.colorbar()
fig0, ax0 = plt.subplots()
strm = ax0.streamplot(X, Y, U, V, color=U, linewidth=2, cmap=plt.cm.autumn)
fig0.colorbar(strm.lines)

f, (ax1, ax2) = plt.subplots(ncols=2)
fig1, (ax1, ax2) = plt.subplots(ncols=2)
ax1.streamplot(X, Y, U, V, density=[0.5, 1])

lw = 5*speed/speed.max()
lw = 5*speed / speed.max()
ax2.streamplot(X, Y, U, V, density=0.6, color='k', linewidth=lw)

plt.show()

0 comments on commit c85c67b

Please sign in to comment.