-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Various backend cleanups. #15211
Various backend cleanups. #15211
Conversation
@@ -963,14 +963,12 @@ def get_renderer(self): | |||
return RendererPgf(self.figure, None, dummy=True) | |||
|
|||
|
|||
class FigureManagerPgf(FigureManagerBase): | |||
pass | |||
FigureManagerPgf = FigureManagerBase |
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.
I wouldn't do this because you don't create a FigureManagerPgf
type with that, so that
>>> mgr = FigureManagerPgf()
>>> type(mgr)
<class 'FigureManagerBase'>
which is a bit confusing.
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.
this is consistent with FigureManagerPS, FigureManagerPDF and FigureManagerSVG, and was discussed in #9551 (review).
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.
Still not convinced this is a good approach, but accepting as precedenced.
- Noninteractive backends don't need to redefine `draw()` as a do-nothing: that's already the default in the base class. - The pgf backend manager can just be an alias for FigureManagerBase: this is consistent with the other noninteractive backends. - FigureCanvasQT doesn't need to assign `self.figure = figure`: that's already done in the super() init. - Use star-unpack in backend_template. - The list of event handlers set up by backend_wx is much bigger than previously documented.
a7223c8
to
4a9f6a8
Compare
rebased |
draw()
as ado-nothing: that's already the default in the base class.
self.figure = figure
:that's already done in the super() init.
previously documented.
PR Summary
PR Checklist