| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| def draw(self, *args, **kwargs): | ||
| _no_op_draw(self.figure) | ||
| return super().draw(*args, **kwargs) |
There was a problem hiding this comment.
I guess the superclass does nothing? It's a bit weird to do a no-op draw, and then go to the super's draw (which, from just looking at this one spot, could conceivably do anything.)
Sorry, something went wrong.
There was a problem hiding this comment.
In 99.9% of cases, the super-call will do nothing, but I do not want to assume that no one has done some (ill-advised?) multiple inheritance of our classes and was relying on hitting their draw.
That said, I think the name _no_op_draw is bad because it is doing an operation (updating our internal state), just not producing any output.
Sorry, something went wrong.
|
This needs a rebase, and its corresponding issue is release critical, so marking the same. |
Sorry, something went wrong.
|
rebased. |
Sorry, something went wrong.
|
Perhaps the docstrings in backend_bases and backend_template should be updated to tell third-party implementers that they need to ensure that draw() walks the artist tree? |
Sorry, something went wrong.
There was a problem hiding this comment.
Minor comments, but basically good.
Sorry, something went wrong.
Previously the non-interactive backends, other than Agg, did not define `draw` methods and fell back to the base no-op version. However, we have been documenting that the correct way to update the various internal state we keep (run tight/constrained layouts, auto limits, text size/position, ...), this is now a bug due to our suggested usage drifting. closes matplotlib#18407
Move the marks to skip if various latex installs are missing to be visible on other modules.
The full artist tree needs to be walked in `draw` to ensure that deferred work is done.
| Back | FazBrowse Home | New Git URL |
Previously the non-interactive backends, other than Agg, did not
define draw methods and fell back to the base no-op version.
However, we have been documenting that the correct way to update the
various internal state we keep (run tight/constrained layouts, auto
limits, text size/position, ...), this is now a bug due to our
suggested usage drifting.
closes #18407
I could be convinced that this should actually be backported for 3.3.2
I'm mixed if these needs an API change note or not.
PR Summary
PR Checklist