Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow overwriting labels for plot/overlay #414

Merged
merged 3 commits into from
Jun 27, 2022

Conversation

andrzejnovak
Copy link
Member

No description provided.

@@ -417,6 +417,14 @@ def plot1d(
cat_ax = self.axes[overlay]
cats = cat_ax if cat_ax.traits.discrete else np.arange(len(cat_ax.centers))
d1hists = [self[{overlay: cat}] for cat in cats]
if "label" in kwargs:
if isinstance(kwargs["label"], list) and len(kwargs["label"]) == len(cats):
Copy link
Member

Choose a reason for hiding this comment

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

Does it have to be a list? Couldn't it be any arbitrary collection? Except a string. I assume you are trying not to match on a string?

src/hist/basehist.py Outdated Show resolved Hide resolved
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
@henryiii henryiii merged commit a93cf5a into scikit-hep:main Jun 27, 2022
@henryiii
Copy link
Member

Thanks! I think we are planning on a release later in the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants