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 plot legend don't show up when dataset start with zero #10176

Merged
merged 5 commits into from
Jul 13, 2023
Merged

Fix plot legend don't show up when dataset start with zero #10176

merged 5 commits into from
Jul 13, 2023

Conversation

Dpbm
Copy link
Contributor

@Dpbm Dpbm commented May 28, 2023

Summary

The relative legend for a dataset didn't show up if the first value is zero. This commit just fixes this behavior, and start showing legend as expected.
Just some lines of _plotting_core was changed and a test was added to check if there're the expected total of legend items.

Details and comments

See the issue #10158 for further information.

@Dpbm Dpbm requested review from a team and nonhermitian as code owners May 28, 2023 14:15
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label May 28, 2023
@CLAassistant
Copy link

CLAassistant commented May 28, 2023

CLA assistant check
All committers have signed the CLA.

@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

@mtreinish mtreinish added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: Bugfix Include in the "Fixed" section of the changelog labels Jun 6, 2023
@mtreinish mtreinish added this to the 0.24.2 milestone Jun 6, 2023
@coveralls
Copy link

coveralls commented Jun 25, 2023

Pull Request Test Coverage Report for Build 5545829737

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 10 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.04%) to 86.019%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 2 91.39%
crates/accelerate/src/vf2_layout.rs 3 94.74%
crates/accelerate/src/sabre_swap/layer.rs 5 96.64%
Totals Coverage Status
Change from base Build 5543757430: 0.04%
Covered Lines: 71903
Relevant Lines: 83590

💛 - Coveralls

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

LGTM, this seems like a straightforward fix. Thanks for doing this and including a release note and unittest to cover this. Sorry it took so long to get eyes on it.

@mtreinish mtreinish added this pull request to the merge queue Jul 13, 2023
@Dpbm
Copy link
Contributor Author

Dpbm commented Jul 13, 2023

@mtreinish no problem, I saw how many issues and PRs you had to check.

Is always a pleasure work in qiskit ☺️

Merged via the queue into Qiskit:main with commit 645598a Jul 13, 2023
mergify bot pushed a commit that referenced this pull request Jul 13, 2023
* added test to plot_histogram with dataset starting with zero

* fixed plot_histogram

* added docs

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
(cherry picked from commit 645598a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog Community PR PRs from contributors that are not 'members' of the Qiskit repo stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants