mappy_ds.plot.plot2d#

mappy_ds.plot.plot2d(diffeo, y0, params=None, config=None, *, mode=None, show=True)#

Iterate a map forever and draw its orbit interactively.

Each animation frame computes one iteration of diffeo and draws the trajectory segments (unless only_map) and the image point.

Interaction:

  • mouse click: restart from the clicked coordinates (for a one-dimensional state the coordinate on config.scalar_axis);

  • space or e: clear the axes;

  • f: toggle drawing the trajectories (only_map);

  • p: select the next parameter of config.param_keys;

  • up/down: change the selected parameter by config.param_step.

Parameters:
diffeoMap

The map to iterate, e.g. a Diffeomorphism or a PoincareMap.

y0array_like

Initial state.

paramsmapping, optional

Parameters of the system; a copy is modified by the up/down keys.

configPlotConfig, optional

Plot configuration; it is not modified.

modestr, optional

For a PoincareMap, the mode to start in instead of its initial_mode. Later iterations continue from the mode each image ends in.

showbool, optional

Call matplotlib.pyplot.show() (blocking), by default True.

Returns:
matplotlib.animation.FuncAnimation

The running animation; keep a reference to it while it runs.

Raises:
ImportError

If matplotlib is not installed.

ValueError

If mode is given for a map other than a PoincareMap.