File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## WIP
4
+
5
+ * Support IntCat for plot1d overlay
6
+ [ #419 ] ( https://github.com/scikit-hep/hist/pull/419 )
7
+
3
8
## Version 2.7.3
4
9
5
10
This release fixes an issue with Python 3.12 pulling in NumPy 2 pre-releases.
Original file line number Diff line number Diff line change @@ -502,8 +502,9 @@ def plot1d(
502
502
(overlay ,) = (i for i , ax in enumerate (self .axes ) if ax .traits .discrete )
503
503
assert overlay is not None
504
504
cat_ax = self .axes [overlay ]
505
- cats = cat_ax if cat_ax .traits .discrete else np .arange (len (cat_ax .centers ))
506
- d1hists = [self [{overlay : cat }] for cat in cats ]
505
+ icats = np .arange (len (cat_ax ))
506
+ cats = cat_ax if cat_ax .traits .discrete else icats
507
+ d1hists = [self [{overlay : cat }] for cat in icats ]
507
508
if "label" in kwargs :
508
509
if not isinstance (kwargs ["label" ], str ) and len (kwargs ["label" ]) == len (
509
510
cats
You can’t perform that action at this time.
0 commit comments