animate_multiple_plots

pandas_alive.plotting.animate_multiple_plots(filename: str, plots: List[Union[pandas_alive.charts.BarChartRace, pandas_alive.charts.LineChart, pandas_alive.charts.PieChart, pandas_alive.charts.ScatterChart]], custom_fig: matplotlib.figure.Figure = None, title: str = None, title_fontsize: Union[int, float, str] = 16, dpi: int = 144, enable_progress_bar: bool = False, adjust_subplot_left: float = 0.15, adjust_subplot_right: float = 0.9, adjust_subplot_bottom: float = 0.1, adjust_subplot_top: float = 0.9, adjust_subplot_wspace: float = 0.2, adjust_subplot_hspace: float = 0.25)[source]

Plot multiple animated subplots with plt.subplots().

Parameters
  • filename (str) – Output file name with extension to write to.

  • plots (typing.List[typing.Union[BarChartRace, LineChart, PieChart, ScatterChart]]) – List of chart instances.

  • custom_fig (plt.Figure, optional) – For greater control over the aesthetics, supply your own Figure. Defaults to None.

  • title (str, optional) – Overall title for plots (suptitle). Defaults to None.

  • title_fontsize (typing.Union[int, float, str], optional) – Font size for suptitle. Defaults to 16.

  • dpi (int, optional) – Custom DPI to increase resolution. Defaults to 144.

  • enable_progress_bar (bool, optional) – Enable tqdm bar to show progress on generating animation, see more details at https://github.com/tqdm/tqdm. Defaults to False.

  • adjust_subplot_left (float, optional) – the left side of the subplots of the figure. Defaults to 0.15.

  • adjust_subplot_right (float, optional) – the right side of the subplots of the figure. Defaults to 0.9.

  • adjust_subplot_bottom (float, optional) – the bottom of the subplots of the figure. Defaults to 0.1.

  • adjust_subplot_top (float, optional) – the top of the subplots of the figure. Defaults to 0.9.

  • adjust_subplot_wspace (float, optional) – the amount of width reserved for space between subplots, expressed as a fraction of the average axis width. Defaults to 0.2.

  • adjust_subplot_hspace (float, optional) – the amount of height reserved for space between subplots, expressed as a fraction of the average axis height. Defaults to 0.25.

Raises

UserWarning – If Error found when plotting, prompt user to ensure indexes of plots are same length.