| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
The changes in qt5_backend.py seem un-related? |
Sorry, something went wrong.
|
On OSX 10.11 I get the following error: File "/Users/marius/Library/Python/3.5/lib/python/site-packages/matplotlib/backends/backend_qt5.py", line 253, in mouseEventCoords
x,y = self.mouseEventCoords(pos)
RecursionError: maximum recursion depth exceeded
|
Sorry, something went wrong.
|
Whoops. I typo'd that pretty badly when building the commit. The changes in the two files are related: if the dpi_ratio is not 1, then mouse events need to be mapped between device and pixel coordinates in order for the rest of the event stack to behave correctly. Fixed some PEP8 violations. |
Sorry, something went wrong.
|
Can this be done in a more general way? something that will be useful for all backends? What about adding a FigureCanvasBase.get_device_pixel_ratio or something like that (returns 1 by default). |
Sorry, something went wrong.
|
It would be great to get a fix in for this, even if it is not a solution that is applicable to all backends. Currently for glue, everything looks nice and crisp, except the Matplotlib canvas, which looks pixellated (on a retina display). |
Sorry, something went wrong.
|
Any progress on this? @astrofrog are you using the MacOSX backend in the meantime? |
Sorry, something went wrong.
|
@adrn This seems to have stalled. Can you test if this |
Sorry, something went wrong.
|
Sorry for partial message (UI fail: start typing, decide to 'powercycle' to re-trigger CI, close and post partial message) @adrn Can you test if this works for qt5 + hidpi? I could be convinced that this should be backported for 2.0 if it gets done in the next week or so. |
Sorry, something went wrong.
|
@adrn For applications that embed the Matplotlib window, the MacOSX backend is not an option. The only standing issue with this is the dpi used in the figure; it is still the default 100, even for Retina display. Maybe this should be scaled by devicePixelRatio? Other than that everything looks really nice and crisp. A print screen of a small app that uses the backend and the code used to make it. It would be really nice to have this in v2.0. |
Sorry, something went wrong.
|
I think we should push for getting this into 2.0. I will see what I can do |
Sorry, something went wrong.
|
@tacaswell I'll also take a look at this today. |
Sorry, something went wrong.
|
@adrn Can you coordinate with @jenshnielsen ? |
Sorry, something went wrong.
|
@adrn if you have time to work on it that is much appreciated, I will then make sure it is reviewed and merged. |
Sorry, something went wrong.
|
@jenshnielsen Will try -- I'm at astrohackweek and will likely spend some hack time on this. |
Sorry, something went wrong.
|
Great if you need any assistance please just ask |
Sorry, something went wrong.
|
Alright here's what I see. I compares (this PR + qt5agg) and (this PR + tkagg) using this code: import numpy as np
import matplotlib as mpl
# mpl.rcParams['backend'] = 'tkagg'
# mpl.rcParams['backend'] = 'qt5agg'
import matplotlib.pyplot as plt
with plt.style.context('classic'):
x = np.random.normal(size=128)
y = np.random.normal(size=128)
plt.scatter(x, y)
plt.show()So it looks like the fix here works, but the fonts, markers, ticks, etc. need to be scaled by the pixel ratio? |
Sorry, something went wrong.
|
I think you just need to up the DPI passed to the renderer? |
Sorry, something went wrong.
|
#5383 which adds hidpi support to the notebook backend may give you some clues on how to do that. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Here's what needs to be done to get HiDPI support working with qt5agg. Not sure if you want to do it this way or some other way.