-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: subplot parameter window appearing 1/4 size on macosx #21648
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
Comments
I don't have a mac to try, but does replacing the entire body of configure_subplot() in _macosx.m by something like (untested, may be missing a semicolon or have some typos) -(void)configure_subplots:(id)sender
{
PyGILState_STATE gstate = PyGILState_Ensure();
PyObject *mod = NULL, *base_class = NULL, *ret = NULL;
if (!(mod = PyImport_ImportModule("matplotlib.backend_bases"))
|| !(base_class = PyObject_GetAttrString(mod, "NavigationToolbar2"))
|| !(ret = PyObject_CallMethod(base_class, "configure_subplots", toolbar))) {
PyErr_Print();
}
Py_XDECREF(mod);
Py_XDECREF(base_class);
Py_XDECREF(ret);
PyGILState_Release(gstate);
} work? (effectively making it inherit the base class implementation, which is after all good enough for most other backends). |
That seems to work, though I also parented the window so that it closes properly, and is slightly more linked to the plot window. I don't know if it fixes retina displays though. |
Bug summary
On the

macosx
backend, the subplot adjustment window is appearing 1/4 sized for me:I'm using a retina display at (2560 × 1600) resolution.
Code for reproduction
Actual outcome
Compressed interactive widgets.
Expected outcome
Widgets fill full window.
Additional information
No response
Operating system
macOS Big Sur (11.6)
Matplotlib Version
matplotlib-3.5.0.dev2555+g4a44cb277e
Matplotlib Backend
macosx
Python version
3.9.7
Jupyter version
No response
Installation
git checkout
The text was updated successfully, but these errors were encountered: