Stream plots, also known as streamline plots are used to visualize vector fields. They are mostly used in the engineering and scientific communities. They use vectors and their velocities as a function of base vectors to draw these plots.
Stream plot
Getting ready
Import the required libraries:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
How to do it...
The following code block creates a stream plot:
- Prepare the data for the stream plot:
x, y = np.linspace(-3,3,100), np.linspace(-2,4,50)
- Create the mesh grid:
X, Y = np.meshgrid...