gemseo / post / core

gantt_chart module

Generate a gantt chart with processes execution time data.

Functions:

create_gantt_chart([file_path, save, show, ...])

Generate a gantt chart with processes execution time data.

gemseo.post.core.gantt_chart.create_gantt_chart(file_path='gantt_chart', save=True, show=False, file_extension=None, figure_size=(15, 10), font_size=12, disc_names=None)[source]

Generate a gantt chart with processes execution time data.

The disciplines names are used as labels and plotted on rows. The x labels are the execution start and end times of all disciplines.

Both executions and linearizations times are plotted.

Warning

MDODiscipline.activate_time_stamps() must be called first.

Parameters
  • file_path (Union[str, pathlib.Path]) –

    The path to save the figure.

    By default it is set to gantt_chart.

  • save (bool) –

    Whether to save the figure.

    By default it is set to True.

  • show (bool) –

    Whether to show the figure.

    By default it is set to False.

  • file_extension (Optional[str]) –

    A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use the default file extension.

    By default it is set to None.

  • figure_size (Tuple[int, int]) –

    The figure size.

    By default it is set to (15, 10).

  • font_size (int) –

    The size of the fonts in the plot.

    By default it is set to 12.

  • disc_names (Optional[Sequence[str]]) –

    The names of the disciplines to plot. If None, plot all the disciplines for which time stamps exist.

    By default it is set to None.

Returns

The matplotlib figure.

Raises

ValueError – If the time stamps is not activated or if a discipline has no time stamps.

Return type

matplotlib.figure.Figure