Set widget background color to white.#9698
Conversation
|
|
||
| super(FigureCanvasQT, self).__init__(figure=figure) | ||
|
|
||
| figure._original_dpi = figure.dpi |
There was a problem hiding this comment.
Does the super chain no longer use _original_dpi?
There was a problem hiding this comment.
AFAICT the only places it is accessed are _update_figure_dpi (which is called later) and print_figure (which is irrelevant here).
There was a problem hiding this comment.
I suspect this got sorted out as part of the initial draw / re-entrant paint fix.
dopplershift
left a comment
There was a problem hiding this comment.
Looks good to me. Just need to rebase to resolve the conflict.
|
Done. Also removed _onEraseBackground from wx, which I forgot to do together with https://github.com/matplotlib/matplotlib/pull/9697/files#diff-19c3295dfd86eed49da406f5e5296055L687. |
The background color of the widget can be seen by setting a transparent
figure facecolor, e.g.
from pylab import *
rcParams["figure.facecolor"] = (0, 0, 0, 0); gca(); show()
The goal is to ultimately replace setting `savefig.transparent` by
`figure.facecolor = (0, 0, 0, 0)`.
As far as I can tell, gtk3 already defaults to a white background. Not
sure what the situation is on OSX.
|
Actually I guess the situation on gtk depends on the desktop theme; it doesn't work on a dark theme for me. A fix is at #19410. |
PR Summary
Set widget background to white.
The background color of the widget can be seen by setting a transparent
figure facecolor, e.g.
The goal is to ultimately replace setting
savefig.transparentbyfigure.facecolor = (0, 0, 0, 0).(see #9080 for example for the slight trickiness of savefig.transparent).
As far as I can tell, gtk3 already defaults to a white background. Not
sure what the situation is on OSX.
PR Checklist