Skip to content

Commit

Permalink
fix: statistics not updating when changing plot axes (close #154)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jan 12, 2024
1 parent abd95f8 commit 2ae5828
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2.15.1
- fix: statistics not updating when changing plot axes (#154)
2.15.0
- enh: avoid creating hierarchy when no filters are applied (speed)
- enh: cache computed statistics
Expand Down
9 changes: 6 additions & 3 deletions shapeout2/gui/quick_view/qv_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,14 @@ def get_event_image(self, ds, event):

def get_statistics(self):
if self.rtdc_ds is not None:
features = [self.comboBox_x.currentData(),
self.comboBox_y.currentData()]
# cache statistics from
dsid = self.rtdc_ds.identifier + self.rtdc_ds.filter._parent_hash
dsid = "-".join(features
+ [self.rtdc_ds.identifier,
self.rtdc_ds.filter._parent_hash]
)
if dsid not in self._statistics_cache:
features = [self.comboBox_x.currentData(),
self.comboBox_y.currentData()]
stats = dclab.statistics.get_statistics(ds=self.rtdc_ds,
features=features,
methods=STAT_METHODS)
Expand Down

0 comments on commit 2ae5828

Please sign in to comment.