You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MacOSX backend: figure is cleared when moving from one screen to another #8387
A figure created on Mac with the MacOSX backend on one screen gets blank when the figure window is dragged to another screen attached to the same computer.
Code for reproduction
importmatplotlibasmplmpl.rcParams["backend"] ="MacOSX"frommatplotlibimportpyplotaspltplt.figure()
plt.plot([0,1],[0,1]) # to have some contentplt.show()
# now drag figure from one screen attached to the computer to another screen attached to the computer
This needs attention from someone who understands the OSX gui framework. It should be simple enough as forceing a re-render when the effective dpi changes.
I was able to reproduce it with v2.0.0 but don't see the issue with the latest master or v2.0.1 so it may have been addressed already. @mmckerns or @HDembinski, can you try with the latest master?
One more comment: When I initially reported this, I used MacOS El Capitan. Before I tried the latest master, I updated to Sierra. Perhaps it is not a change in matplotlib but a change in the MacOS Version...
Activity
mmckerns commentedon Apr 17, 2017
as noted in #8500, the plot "reappears" if you resize the window
HDembinski commentedon Apr 20, 2017
Yes, resizing the window is a workaround, but it leads to loss of exact figure size in pixel (unless you have uncanny marksmanship with the mouse).
tacaswell commentedon Apr 20, 2017
This needs attention from someone who understands the OSX gui framework. It should be simple enough as forceing a re-render when the effective dpi changes.
cimarronm commentedon May 23, 2017
I cannot seem to reproduce but am running macOS Sierra. @HDembinski, are you able to test with latest OS and still see the issue?
tacaswell commentedon May 23, 2017
I strongly suspect that there are latent DPI scaling related issues in this, possibly put in by my work on qt5 and hi-dpi...
HDembinski commentedon May 23, 2017
@cimarronm I will give it a try tomorrow! I compiled matplotlib myself on Linux before, not on Mac, but hopefully it will work fine.
mmckerns commentedon May 23, 2017
@cimarronm: I see the bug on macOS Sierra.
cimarronm commentedon May 26, 2017
I was able to reproduce it with v2.0.0 but don't see the issue with the latest master or v2.0.1 so it may have been addressed already. @mmckerns or @HDembinski, can you try with the latest master?
HDembinski commentedon May 26, 2017
I just downloaded and compiled the github master, and it works like a charm now!
tacaswell commentedon May 26, 2017
I have no idea what we changed that would have fixed this....
tacaswell commentedon May 26, 2017
Closing as this is reported fixed on master.
HDembinski commentedon May 28, 2017
One more comment: When I initially reported this, I used MacOS El Capitan. Before I tried the latest master, I updated to Sierra. Perhaps it is not a change in matplotlib but a change in the MacOS Version...