-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fixes to various graphs in the docs #14055
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
Conversation
One or more of the following people are relevant to this code:
|
can you also fix this similar issue? #13632 |
Already handled by this PR.
All look good. |
Pull Request Test Coverage Report for Build 14019415716Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gadial. Given that the fix only affects docs generated by sphinx, I think we can consider this a documentation fix, which doesn't require a release note.
…ncies between the server and local versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gadial! The changes LGTM. The visual test references are always very annoying, because depending on the OS and other small factors, the images show this small discrepancy that breaks tests. I think that reducing the tolerance is ok in this case, not perfect, but comparing pixels is not a perfect method anyways. Alternatively, what usually do in these cases, is that I copy the output image generated in the CI visual tests published artifacts (here), but I wouldn't bother doing it in this case, I can see in the artifacts that the images are essentially correct.
* Fixes to various graphs in the docs * Fix a bug caused by `tight_layout` crashing on some images * Apply the fix to the timeline plotter * Remove release note and fix bloch sphere visualization * Additional bloch fix * Slighly relax image compairson for bloch sphere due to small discrepancies between the server and local versions. (cherry picked from commit dc672d5)
* Fixes to various graphs in the docs * Fix a bug caused by `tight_layout` crashing on some images * Apply the fix to the timeline plotter * Remove release note and fix bloch sphere visualization * Additional bloch fix * Slighly relax image compairson for bloch sphere due to small discrepancies between the server and local versions. (cherry picked from commit dc672d5) Co-authored-by: gadial <gadial@gmail.com>
Summary
Fixes visual problems in the display of some of the visualizations in the docs.
Fixes #13558
Fixes #13632
Details and comments
What's fixed
self.figure.tight_layout()
when callingget_image
fixes this.tight_layout
when returning the figure fixes the way sphinx displays it.y=1.0 + title_pad / 100
which is greater than 1; changing to 0.98 and enlarging the height of the image instead fixes this.tight_layout
What was not fixed
Before/after screenshots
GratphState
QuantumVolume
InnerProduct
DynamicalDecoupling