plotting package

Submodules

plotting.metrics_study module

plotting.plot_2d_mesh module

plotting.plot_2d_mesh.plot_mesh_2d(ax, mesh_coords, title, field_name, field_data=None, color_bar=True, xlim=None, ylim=None)[source]

Plot a mesh colored by field data.

Parameters:
  • ax (matplotlib.axes.Axes) – The axes to plot on.

  • mesh_coords (numpy.ndarray) – Array with shape (N, 2) containing the x, y coordinates of the mesh.

  • title (str) – The title of the plot.

  • field_name (str) – The name of the field data.

  • field_data (numpy.ndarray, optional) – Array with shape (N,) containing the field data. Defaults to None.

  • color_bar (bool, optional) – Whether to display a color bar. Defaults to True.

  • xlim (tuple, optional) – Optional x-axis limits (min, max). Defaults to None.

  • ylim (tuple, optional) – Optional y-axis limits (min, max). Defaults to None.

Returns:

None

plotting.plot_2d_mesh.plot_mesh_3d_interactive(X, y=None, field_variable_idx=None)[source]

Plot a 3D interactive mesh.

Parameters:
  • X (numpy.ndarray) – Array with shape (N, 3) containing the x, y, z coordinates of the mesh.

  • y (numpy.ndarray) – Array with shape (N, M) containing the field data.

  • field_variable_idx (int, optional) – The index of the field variable to color the mesh by. Defaults to None.

Returns:

None

plotting.plotter module

class plotting.plotter.Plotter[source]

Bases: ABC

Abstract class for plotting the results of a model.

abstract plot(y_true, y_pred, path)[source]

Plot the results of the model.

Parameters:
  • y_true (np.ndarray) – The true target values.

  • y_pred (np.ndarray) – The predicted target values.

  • path (str) – The path to save the plot.

plotting.true_vs_pred_plot module

class plotting.true_vs_pred_plot.TrueVsPredPlotter[source]

Bases: Plotter

Class for plotting a scatter plot with the true vs predicted values.

plot(y_true, y_pred, path, name=None)[source]

Plot the results of the model.

Parameters:
  • y_true (np.ndarray) – The true target values.

  • y_pred (np.ndarray) – The predicted target values.

  • path (str) – The path to save the plot.

  • name (str)

Module contents