-
Notifications
You must be signed in to change notification settings - Fork 569
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
Minor improvements to PL plot style #4690
Conversation
Hello. You may have forgotten to update the changelog!
|
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.
Very nice @ikurecic 🥂
some minor comments and I noticed that the output for me is slightly different, not sure if this is expected or not
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4690 +/- ##
==========================================
- Coverage 99.64% 99.63% -0.01%
==========================================
Files 377 377
Lines 33999 33738 -261
==========================================
- Hits 33878 33616 -262
- Misses 121 122 +1 ☔ View full report in Codecov by Sentry. |
[sc-48246] |
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com>
**Context:** Documentation for the use of the `pennylane` style of `qml.drawer` and the `pennylane.drawer.plot` style of `matplotlib.pyplot` with regards to the default (Quicksand Bold) font needed to be improved, and minor cosmetic changes to plots were suggested. **Description of the Change:** Plots generated with the `pennylane.drawer.plot` style of `matplotlib.pyplot` now have black axis labels and are generated at a default DPI of 300. Documentation for the use of the `pennylane` style of `qml.drawer` and the `pennylane.drawer.plot` style of `matplotlib.pyplot` has also been improved. **Benefits:** Looks better. 😁 **Possible Drawbacks:** None. **Related GitHub Issues:** None. --------- Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com> Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
One issue with using Quicksand Bold as the font is that import pennylane as qml
dev = qml.device("default.qubit")
@qml.qnode(dev)
def f():
qml.PhaseShift(0.4, wires=0)
return qml.state()
qml.draw_mpl(f, style="pennylane")()
Not sure how we can fix this though other than not using that font. |
@trbromley Yikes! 🤦♀️ We do have 'another' PL font, but that's still being perfected — I'll make sure to include this in the considerations there. Thank you! |
Context: Documentation for the use of the
pennylane
style ofqml.drawer
and thepennylane.drawer.plot
style ofmatplotlib.pyplot
with regards to the default (Quicksand Bold) font needed to be improved, and minor cosmetic changes to plots were suggested.Description of the Change: Plots generated with the
pennylane.drawer.plot
style ofmatplotlib.pyplot
now have black axis labels and are generated at a default DPI of 300. Documentation for the use of thepennylane
style ofqml.drawer
and thepennylane.drawer.plot
style ofmatplotlib.pyplot
has also been improved.Benefits: Looks better. 😁
Possible Drawbacks: None.
Related GitHub Issues: None.