MatplotlibWidget definition

class encore.plotters.MatplotlibWidget.CustomNavigationToolbar(canvas, parent=None)
save_figure(*args)

Open a file dialog and save the current figure.

This method allows saving the figure as either SVG or PNG. For SVG output, the font type is set to preserve text as text instead of paths.

Parameters:

args (tuple) – Additional positional arguments (unused).

class encore.plotters.MatplotlibWidget.MatplotlibWidget(rows=1, cols=1, parent=None)
reset(default_text='Nothing to show', rows=1, cols=1)

Reset the figure and display a placeholder message.

This method clears the figure, recreates the subplot layout, and displays a centered text message indicating that no data is currently available.

Parameters:
  • default_text (str, optional) – Text to display in the figure, defaults to “Nothing to show”.

  • rows (int, optional) – Number of subplot rows, defaults to 1.

  • cols (int, optional) – Number of subplot columns, defaults to 1.

set_subplots(rows, cols)

Clear the current figure and create a new grid of subplots.

All axes are initialized with their visibility turned off. The layout is automatically adjusted when multiple subplots are created.

Parameters:
  • rows (int) – Number of subplot rows.

  • cols (int) – Number of subplot columns.