Skip to content

Conversation

@PaulJonasJost
Copy link
Collaborator

@PaulJonasJost PaulJonasJost commented May 13, 2025

Options to plot by. (not yet vis spec)

current issues:
- not errorbar redoing
- not clear how barplots would be plotted
- highlighting with multiple observables in one plot seems difficult.
@PaulJonasJost PaulJonasJost requested a review from Copilot May 13, 2025 19:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for grouping data in plots by adding a new group_by parameter and updating how grouping is handled across the plotting components and toolbar options.

  • Added a group_by argument to PlotWorker and updated the corresponding call sites.
  • Introduced ToolbarOptionManager to synchronize grouping options across toolbars and updated the UI accordingly.
  • Adjusted the plot point click callback to handle an additional data_type parameter for proper proxy resolution.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/petab_gui/views/simple_plot_view.py Added group_by support for plot worker and updated legend handling and toolbar options.
src/petab_gui/controllers/mother_controller.py Updated the click callback to use the new signature and resolve the correct proxy based on data_type.

Comment on lines +374 to +378
self.groupy_by_options = {
grp: QAction(f"Groupy by {grp}", self)
for grp in ["observable", "dataset", "condition"]
}
for grp, action in self.groupy_by_options.items():
Copy link

Copilot AI May 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UI label text 'Groupy by' appears to be a typo. Consider changing it to 'Group by' for clarity.

Suggested change
self.groupy_by_options = {
grp: QAction(f"Groupy by {grp}", self)
for grp in ["observable", "dataset", "condition"]
}
for grp, action in self.groupy_by_options.items():
self.group_by_options = {
grp: QAction(f"Group by {grp}", self)
for grp in ["observable", "dataset", "condition"]
}
for grp, action in self.group_by_options.items():

Copilot uses AI. Check for mistakes.
@PaulJonasJost PaulJonasJost merged commit 5602674 into develop May 13, 2025
@PaulJonasJost PaulJonasJost deleted the group_by branch May 13, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants