-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conform iplot_histogram and plot_histogram
This commit fixes the inconsistencies between the 2 histogram plot functions iplot_histogram (for an interactive js plot) and plot_histogram (for a matplotlib generated plot). Both functions perform the same function just using different tools. To make them interchangeable this commit addresses the differences between the 2 and makes the interface the same between the 2. However, because of backwards compat concerns with plot_histogram (which has been present in several releases already) there is a some duplication of number_to_keep kwarg and the options dict. This deprecates the number_to_keep parameter so users can migrate off of it and then we can remove it from both plot_histogram and iplot_histogram. With the interfaces to both functions being the same this commit also updates the __init__ module to leverage iplot_histogram by default if qiskit.tools.visualization.plot_histogram() is called and we're running under jupyter and have a network connection to download the necessary js. Fixes #864
- Loading branch information
Showing
3 changed files
with
95 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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