control.phaseplot.streamplot
- control.phaseplot.streamplot(sys, pointdata, gridspec=None, zorder=None, ax=None, vary_color=False, vary_linewidth=False, cmap=None, norm=None, suppress_warnings=False, _check_kwargs=True, **kwargs)[source]
Plot streamlines in the phase plane.
This function plots the streamlines for a two-dimensional state space system using the
matplotlib.axes.Axes.streamplotfunction.- Parameters:
- sys
NonlinearIOSystemor callable(t, x, …) I/O system or function used to generate phase plane data. If a function is given, the remaining arguments are drawn from the
paramskeyword.- pointdatalist or 2D array
List of the form [xmin, xmax, ymin, ymax] describing the boundaries of the phase plot.
- gridspeclist, optional
Specifies the size of the grid in the x and y axes on which to generate points.
- paramsdict or list, optional
Parameters to pass to system. For an I/O system,
paramsshould be a dict of parameters and values. For a callable,paramsshould be dict with key ‘args’ and value given by a tuple (passed to callable).- colormatplotlib color spec, optional
Plot the vector field in the given color.
- ax
matplotlib.axes.Axes, optional Use the given axes for the plot, otherwise use the current axes.
- sys
- Returns:
- outStreamplotSet
Containter object with lines and arrows contained in the streamplot. See
matplotlib.axes.Axes.streamplotfor details.
- Other Parameters:
- cmapstr or Colormap, optional
Colormap to use for varying the color of the streamlines.
- norm
matplotlib.colors.Normalize, optional Normalization map to use for scaling the colormap and linewidths.
- rcParamsdict
Override the default parameters used for generating plots. Default is set by
config.default['ctrlplot.rcParams'].- suppress_warningsbool, optional
If set to True, suppress warning messages in generating trajectories.
- vary_colorbool, optional
If set to True, vary the color of the streamlines based on the magnitude of the vector field.
- vary_linewidthbool, optional.
If set to True, vary the linewidth of the streamlines based on the magnitude of the vector field.
- zorderfloat, optional
Set the zorder for the streamlines. In not specified, it will be automatically chosen by
matplotlib.axes.Axes.streamplot.