visualtraceplotter.py

subplot_calc(total_sensors, sensors_per_plot)[source]

Automatically calculate the number of subplots based on the total number of sensors to be plot and the maximum per subplot

Parameters:
  • total_sensors (range | None) – The sensors that are to be plot

  • sensors_per_plot (int | None) – The maximum amount of sensors to be plot per subplot

Returns:

coord[int,int] – The amount of rows and columns for the matplotlib figure.

make_labels(legend_loc_trace_opts, axs, leg_font_size_plot_opts, linestemp)[source]

Make a legend for a filled subplot

Parameters:
  • legend_loc_trace_opts (str | None) – Legend location based on matplotlib legend location string, from TraceOptsSensor class.

  • axs (matplotlib.axes.Axes | None) – Subplot to create legend for.

  • leg_font_size_plot_opts (float | None) – Font size for legend, from PlotOptsGeneral class

  • linestemp (list | None) – List of the lines plot on subplot for the legend

plot_time_traces(sensor_array, comp_key=None, trace_opts=None, plot_opts=None)[source]

Plots time traces for the truth and virtual experiments of the sensors in the given sensor array.

Parameters:
  • sensor_array (SensorPoint) – The sensor array to plot times traces from.

  • comp_key (str | None) – String key for the field component to plot, by default None. If None then the first component in the measurement array is plotted

  • trace_opts (TraceOptsSensor | None, optional) – Dataclass containing specific options for controlling the plot appearance, by default None. If None the default options are used.

  • plot_opts (PlotOptsGeneral | None, optional) – Dataclass containing general options for formatting plots and visualisations, by default None. If None the default options are used.

Returns:

tuple[Any,Any] – A tuple containing a handle to the matplotlib figure and axis objects: (fig,ax).