Repository navigation
fix(histogram): filter excess groups and align titles - #433
Merged
georgezakinih merged 3 commits intoAug 4, 2026
Merged
Conversation
- keep the most frequent groups when `max_groups` is exceeded - surface the warning through the histogram template logger - update histogram tests for the filtering path
- Use compact table-aware histogram titles in core and template paths - Preserve core-owned panel titles for multi-axis outputs - Add template smoke coverage for figure title output - Update core title expectations for the revised wording
zhan4329
marked this pull request as ready for review
July 1, 2026 12:51
georgezakinih
requested changes
Jul 7, 2026
| ) | ||
| warnings.warn(warning_message, UserWarning) | ||
| n_groups = len(groups) | ||
| plot_data = plot_data[plot_data[group_by].isin(groups)] |
Contributor
There was a problem hiding this comment.
Should we show a message in the plot that we are not showing all groups?
| ) | ||
|
|
||
| self.assertIsNotNone(fig._suptitle) | ||
| self.assertTrue(fig._suptitle.get_text()) |
Contributor
There was a problem hiding this comment.
Please add an example for various titles that are generated in different scenarios.
6 tasks done
- Pass filtering metadata from core histogram output to templates. - Add grouped and faceted top-N title suffixes. - Expand title examples and filtering assertions.
Open
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This follow-up focuses on two review-driven fixes:
max_groupsgroups instead of failing outrightChanges
UserWarningand plot the top groups when group count exceedsmax_groups.Testing
Result:
Example
The screenshot below shows how filtering works: previously when the number of groups exceeds
max_groups, it will reject the input. Now it automatically filters the topmax_groupsfrequent groups and plot them. (There are some overlapping issues here due to long titles which I do not intend to take care of in this PR).This screenshot captures checkpoint at zhan4329@f047513. Since the file is too large, you may check the testing notebook at this commit here (at Y.11, or cell 18): https://github.com/zhan4329/SCSAWorkflow/blob/f0475138eda033a844f0509f77326a649140bbd3/notebooks/test_histogram_facet_light_template.ipynb
This pull request body is generated with the help of Codex using GPT-5.