diff --git a/plot_types/arrays/streamplot.py b/plot_types/arrays/streamplot.py index 2cad7d7603e0..d50d9cea6580 100644 --- a/plot_types/arrays/streamplot.py +++ b/plot_types/arrays/streamplot.py @@ -13,16 +13,15 @@ # make a stream function: X, Y = np.meshgrid(np.linspace(-3, 3, 256), np.linspace(-3, 3, 256)) Z = (1 - X/2. + X**5 + Y**3) * np.exp(-X**2 - Y**2) -Z = Z - Z.min() # make U and V out of the streamfunction: V = np.diff(Z[1:, :], axis=1) U = -np.diff(Z[:, 1:], axis=0) # plot: fig, ax = plt.subplots() -# contour stream function -ax.contour(X, Y, Z, colors='C1', alpha=0.5, zorder=1, linewidths=3) +ax.grid(False) + # plot stream plot -ax.streamplot(X[1:, 1:], Y[1:, 1:], U, V, zorder=2) +ax.streamplot(X[1:, 1:], Y[1:, 1:], U, V) plt.show()
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: