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.

  • save (bool) – Whether to save the figure.

  • show (bool) – Whether to show the figure.

  • file_extension (Optional[str]) – A file extension, e.g. ‘png’, ‘pdf’, ‘svg’, … If None, use the default file extension.

  • figure_size (Tuple[int, int]) – The figure size.

  • font_size (int) – The size of the fonts in the plot.

  • disc_names (Optional[Sequence[str]]) – The names of the disciplines to plot. If None, plot all the disciplines for which time stamps exist.

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