Skip to content

More qt fractional DPI fixes #17640

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

Merged
merged 3 commits into from
Jun 16, 2020
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Jun 15, 2020

PR Summary

Followup to #15656.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • [N/A] New features are documented, with examples if plot related
  • [N/A] Documentation is sphinx and numpydoc compliant
  • [N/A] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [N/A] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@QuLogic QuLogic added this to the v3.2.2 milestone Jun 15, 2020
@tacaswell
Copy link
Member

image

import matplotlib.pyplot as plt
import numpy as np

th = np.linspace(0, 2*np.pi, 512)

fig, ax = plt.subplots()
ax.plot(th, np.sin(th))
ax.plot(th, np.cos(th))

ax.set_title(fig.canvas._dpi_ratio)

plt.show()

Each of those was launched with

19:57:24 $ with ${...}.swap(QT_SCALE_FACTOR=2.0): 
............     python /tmp/tester.py & 
............      

There is no visual difference between this branch and master.

@tacaswell tacaswell mentioned this pull request Jun 16, 2020
@QuLogic
Copy link
Member Author

QuLogic commented Jun 16, 2020

From what we've seen, I think that should be correct. At least, it seems like setDevicePixelRatioF and setDevicePixelRatio do the same thing... Maybe they're there in order to be extra-explicit about types.

@story645 story645 merged commit 3460e0e into matplotlib:master Jun 16, 2020
@lumberbot-app
Copy link

lumberbot-app bot commented Jun 16, 2020

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout v3.2.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 3460e0e7b40ab61e0626cfeebb3ae9c22f255d16
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #17640: More qt fractional DPI fixes'
  1. Push to a named branch :
git push YOURFORK v3.2.x:auto-backport-of-pr-17640-on-v3.2.x
  1. Create a PR against branch v3.2.x, I would have named this PR:

"Backport PR #17640 on branch v3.2.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Jun 16, 2020
Merge pull request matplotlib#17640 from QuLogic/more-pyqt5-fixes

More qt fractional DPI fixes
@QuLogic QuLogic deleted the more-pyqt5-fixes branch June 16, 2020 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants