brainpy.visualization.animate_1D

brainpy.visualization.animate_1D(dynamical_vars, static_vars=(), dt=None, xlim=None, ylim=None, xlabel=None, ylabel=None, frame_delay=50.0, frame_step=1, title_size=10, figsize=None, gif_dpi=None, video_fps=None, save_path=None, show=True)[source]

Animation of one-dimensional data.

Parameters
  • dynamical_vars (dict, np.ndarray, list of np.ndarray, list of dict) – The dynamical variables which will be animated.

  • static_vars (dict, np.ndarray, list of np.ndarray, list of dict) – The static variables.

  • xticks (list, np.ndarray) – The xticks.

  • dt (float) – The numerical integration step.

  • xlim (tuple) – The xlim.

  • ylim (tuple) – The ylim.

  • xlabel (str) – The xlabel.

  • ylabel (str) – The ylabel.

  • frame_delay (int, float) – The delay to show each frame.

  • frame_step (int) – The step to show the potential. If frame_step=3, then each frame shows one of the every three steps.

  • title_size (int) – The size of the title.

  • figsize (None, tuple) – The size of the figure.

  • gif_dpi (int) – Controls the dots per inch for the movie frames. This combined with the figure’s size in inches controls the size of the movie. If None, use defaults in matplotlib.

  • video_fps (int) – Frames per second in the movie. Defaults to None, which will use the animation’s specified interval to set the frames per second.

  • save_path (None, str) – The save path of the animation.

  • show (bool) – Whether show the animation.

Returns

figure – The created figure instance.

Return type

plt.figure