hyloa.gui.plot_window module
Code to manage the plot window
- class hyloa.gui.plot_window.PlotControlWidget(app_instance, number_plots, plot_name='Graph')[source]
Bases:
QWidgetMain widget for managing a single plot’s interface and user interactions.
Allows the user to configure and customize data visualization options, including selecting datasets, customizing styles, fitting curves, and toggling data visibility.
- add_pair(file_text=None, x_col=None, y_col=None)[source]
Add a new data pair selector to the interface.
Each pair consists of a file selection dropdown and corresponding x/y column selectors. Optionally pre-selects values for restoring saved sessions.
- Parameters:
file_text (str, optional) – The name of the file to be preselected.
x_col (str, optional) – The x-axis column name to be preselected.
y_col (str, optional) – The y-axis column name to be preselected.
- init_ui()[source]
Construct the user interface for the plot control panel.
Creates button layouts for plot interaction, including creation, customization, and manipulation of data cycles. Also builds a scrollable area to add and manage cycle pairs dynamically.
- hyloa.gui.plot_window.customize_plot_appearance(parent_widget)[source]
Function to customize the appearance of the plot (font sizes, minor ticks).
- Parameters:
parent_widget (QWidget) – parent PyQt5 window
- hyloa.gui.plot_window.customize_plot_style(parent_widget, plot_customizations, number_plots, figures_map)[source]
Opens a PyQt5 dialog to customize color, marker, and line style of a cycle in the plot.
- Parameters:
parent_widget (QWidget) – parent PyQt5 window
plot_customizations (dict) – dictionary to save users customizations
number_plots (list) – list with one element, current plot number
figures_map (dict) – dictionary to store all the matplotlib figures
- hyloa.gui.plot_window.cycle_visibility(parent_widget, number_plots, figures_map, plot_customizations)[source]
Opens a dialog to select which cycles to show/hide in the plot.
- Parameters:
parent_widget (QWidget) – parent PyQt5 window
number_plots (list) – list with one element, current plot number
figures_map (dict) – dictionary to store all the matplotlib figures
plot_customizations (dict) – dictionary with customizations (used to get labels)
- hyloa.gui.plot_window.open_curve_fitting_window(app_instance, plot_widget)[source]
Apre una finestra per configurare il fitting dei dati.
- Parameters:
app_instance (MainApp) – Istanza principale dell’applicazione.
plot_widget (PlotControlWidget) – Istanza della finestra di controllo del plot corrente.
- hyloa.gui.plot_window.plot_data(plot_window_instance, app_instance)[source]
Create the plot with the selected pairs using matplotlib.
- Parameters:
plot_window_instance (PlotControlWidget) – Instance of the plot control widget containing the selected pairs.
app_instance (MainApp) – Main application instance containing the session data.