plots.add_streamlines
plots.add_streamlines(soln, ax, axis=None, **kwargs)Overlay 2D streamlines on an existing Matplotlib axes.
Extracts the two in-plane velocity components at the midpoint slice along the given axis, then calls ax.streamplot to draw the streamlines.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| soln | FlowResult | Converged flow result returned by solve_flow() or read_flow_vtr(). |
required |
| ax | matplotlib.axes.Axes | The axes object on which to draw the streamlines. | required |
| axis | int | The normal axis of the 2D slice to visualize: 0 → yz-plane (x midpoint), 1 → xz-plane (y midpoint), 2 → xy-plane (z midpoint). If None, then an axis perpendicular to the direction of flow will be used. |
None |
| **kwargs | Additional keyword arguments forwarded directly to ax.streamplot (e.g. color='white', density=1.5). |
{} |
Returns
| Name | Type | Description |
|---|---|---|
| ax | matplotlib.axes.Axes | The axes with streamlines added. |