| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I wonder if this will make #18274 work better (with adjustments there as well) |
Sorry, something went wrong.
|
OK, I renamed it, and also made the setter return whether the ratio changed; it seems common in backends to do something in such cases, so that removes some code from all of them. |
Sorry, something went wrong.
| self.figure._original_dpi = self.figure.dpi | ||
| self.figure.dpi = dpi_ratio * self.figure._original_dpi | ||
| self._dpi_ratio = dpi_ratio | ||
| def handle_set_device_pixel_ratio(self, event): |
There was a problem hiding this comment.
I guess these handlers are effectively private and we reserve the right to change them as we see fit with no deprecation?
Sorry, something went wrong.
There was a problem hiding this comment.
That's a good point, but I would say so. They're tied directly with the JavaScript side of the implementation, and I don't think we've ever guaranteed anything there.
In this case, it's only a rename for consistency's sake, so I could revert it.
Sorry, something went wrong.
There was a problem hiding this comment.
This will likely require a change in ipympl, but I think we should make the changes to keep the function names consistent (in this case).
Sorry, something went wrong.
There was a problem hiding this comment.
I restored the handler for set_dpi_ratio, as then one can continue using an older version of ipympl with the new Matplotlib that comes out with this change.
Sorry, something went wrong.
There was a problem hiding this comment.
Just one minor point about public/private API.
Sorry, something went wrong.
This is a corollary to matplotlib/matplotlib#19126.
This is a corollary to matplotlib/matplotlib#19126.
This is already implemented in two backends (Qt5 and nbAgg), and I plan to implement it in TkAgg, so it's better to remove the repetition.
This was not originally implemented in matplotlib#19126, but causes some inconsistencies with other backends. This also sets the initial scale as implemented in matplotlib#18274.
This was not originally implemented in matplotlib#19126, but causes some inconsistencies with other backends. This also sets the initial scale as implemented in matplotlib#18274.
This was not originally implemented in matplotlib#19126, but causes some inconsistencies with other backends. This also sets the initial scale as implemented in matplotlib#18274.
This was not originally implemented in matplotlib#19126, but causes some inconsistencies with other backends. This also sets the initial scale as implemented in matplotlib#18274.
| Back | FazBrowse Home | New Git URL |
PR Summary
This is already implemented in two backends (Qt5 and nbAgg), and I plan to implement it in TkAgg, so it's better to remove the repetition.
It may also be useful for external backends.
I haven't fully tested this yet (though the test suite passes), as it's waiting for #19083 and #19123.
PR Checklist