streamplot(X, Y, U, V)#

Draw streamlines of a vector flow.

See streamplot.

streamplot
import matplotlib.pyplot as plt
import numpy as np

plt.style.use('_mpl-gallery-nogrid')

# make a stream function:
np.linspace(-3, 3, 256), np.linspace(-3, 3, 256))
Y**3) * Y**2)
# make U and V out of the streamfunction:
Z[1:, :], axis=1)
Z[:, 1:], axis=0)

# plot:
fig, ax = plt.subplots()

ax.streamplot(V)

plt.show()

Gallery generated by Sphinx-Gallery