Add support for scatter plot tooltip on-hover#13642
Conversation
9ceb70d to
f4a16f9
Compare
2c4b97a to
05b11fc
Compare
There was a problem hiding this comment.
Pull request overview
Adds hover tooltips for scatter plot points in the Everest batch objective function plot and refactors plot hover handling into tooltip manager classes.
Changes:
- Introduces
ScatterTooltipManagerand a tooltip manager factory. - Updates existing line/bar tooltip wiring to use the shared factory.
- Adds detailed hover labels for rejected Everest batch objective points.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/ert/gui/tools/plot/plottery/plots/tooltip_manager.py |
Adds shared tooltip manager plumbing and scatter tooltip support. |
src/ert/gui/tools/plot/plottery/plots/plot_tools.py |
Delegates hover setup to the tooltip manager factory. |
src/ert/gui/tools/plot/plottery/plots/everest_batch_objective_function_plot.py |
Adds scatter tooltip labels for rejected batch points. |
src/ert/gui/tools/plot/plottery/plots/everest_objective_function_plot.py |
Updates line tooltip call signature. |
src/ert/gui/tools/plot/plottery/plots/everest_controls_plot.py |
Updates line tooltip call signature. |
src/ert/gui/tools/plot/plottery/plots/everest_gradients_plot.py |
Updates bar tooltip call signature. |
src/ert/gui/tools/plot/plottery/plots/ensemble.py |
Updates line tooltip call signature. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13642 +/- ##
==========================================
- Coverage 89.54% 89.17% -0.37%
==========================================
Files 464 469 +5
Lines 32778 33295 +517
==========================================
+ Hits 29351 29692 +341
- Misses 3427 3603 +176
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9c39a79 to
67394df
Compare
264dbd1 to
89c4e09
Compare
| LEGEND_THRESHOLD = 5 | ||
|
|
||
| # Number of significant digits to show in plots | ||
| SIGNIFICANT_DIGITS = 4 |
There was a problem hiding this comment.
Would placing this in plot_tools.py be better? I assume its only the line-hover that will be using this?
| rejected_data = data[~data["is_improvement"]] | ||
| if not rejected_data.empty: | ||
| axes.scatter( | ||
| scatter_data = axes.scatter( |
There was a problem hiding this comment.
Should this be named rejected_scatter_data or something along those lines? When we remove Extended plot information we will plot the accepted as scatter points too
Issue
Resolves #13590
Approach
🧠 📜