-
Notifications
You must be signed in to change notification settings - Fork 225
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
(Auto-)Resize plots that start too large #431
Comments
One quick temporary (Jupyter Lab side) workaround is the following; in CSS (widget.css) add .p-Widget, .lm-Widget {
overflow-x: auto;
} or alternatively: .jupyter-matplotlib {
overflow-x: visible; /* or auto; was hidden */
}
.jupyter-widgets {
overflow-x: hidden; /* or auto; was visible*/
} or .jp-OutputArea-child {
overflow-x: auto;
} This gives you back the horizontal scrollbar when the figure overflows the cell horizontally. |
Thanks for reporting and suggesting a fix @mueslo ! I think this has the same core cause as #242 one point of clarification: does the scroll bar only show up when the widget is partially clipped, or is it always present? If the former then I like the solution of modifying the |
With my solutions it only shows up when necessary, i.e. when the output exceeds the jupyter lab output cell size. But I have noticed that JupyterLab never displays horizontal scroll bars, so maybe it should be fixed there instead of here (and all of these fixes would require changes outside of ipympl also) |
I think both are an option. It's much easier to push a new release here than in jlab so we can do a fix here and you can also open an issue there. Would you be willing to make a PR with your fix? |
Sadly it seems like modifying |
Hello, @mueslo! Could you tell me, please, where can I find widget.css file? |
I have the same problem here that the image is too large, what is the solution now? Where is the |
Describe the issue
Plots by default are sometimes too large, and the right side is cut off (e.g. when using the sexy Jupyter Lab side-by-side rendering or just using a small screen. Obviously you then want to resize them. However, since the resize handle is at the bottom right, it is also not visible. So the only current solution is to manually change the figure size in the code and re-run until it is visible. Not an ideal solution; sometimes you may not have direct access to the code creating the figure.
Some possible solutions:
The current state is rather frustrating.
Example:
Versions
jupyterlab==3.2.8
jupyterlab-widgets==1.0.2
ipympl==0.8.7
ipywidgets==7.6.5
The text was updated successfully, but these errors were encountered: