-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Responsive figure with locked aspect ratio #3467
Comments
Thank you @nicolaskruchten for reporting this issue! The following CSS trick can help with this scenario: https://spin.atomicobject.com/2015/07/14/css-responsive-square/ Here's an example of it in action: https://codepen.io/anon/pen/GzJjKL Because this CSS trick is subtle, cc @plotly/plotly_js |
The trick is a good workaround for single plots, but won't work for subplots. It would be great to be able to display independent subplots using a constrained ratio (or at least unconstrained/square). |
You must be looking for: |
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson |
Right now if I have a container that's got a constrained width but an unconstrained height (like, say, a Jupyter Notebook output cell ;) then I can make my figure responsive, which will cause it to fill the available width, but then I have to explicitly set the height of the figure. It would be really great to be able to set the desired aspect ratio such that the heigh would depend on the responsive width (and vice versa)
The text was updated successfully, but these errors were encountered: