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
fix Matplotlib Responsiveness and improve reference notebook #5973
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5973 +/- ##
==========================================
+ Coverage 82.54% 84.38% +1.84%
==========================================
Files 291 291
Lines 43348 43479 +131
==========================================
+ Hits 35781 36691 +910
+ Misses 7567 6788 -779
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Changing the height from |
It would be nice to get a quick review from @philippjfr because there is a lot of history and a lot possible ways to use this Matplotlib pane. |
This one is ready for review. Don't plan any changes before review. |
Co-authored-by: Philipp Rudiger <prudiger@anaconda.com>
…loviz/panel into fix/matplotlib-responsiveness
I believe this PR fixes the Matplotlib responsiveness issues reported in #5967. Its really hard to know because there are so many possible combinations of settings. And for example the
scale_height
,scale_width
andscale_both
values I've never understood how are expected to work. For me that is a big mystery and I'm not able to understand it from the Panel docs. The same goes for theheight_policy
andwidth_policy
. I just never use them.You can confirm manually that it works via
Due to bug #5971 you will have to manually refresh the page every time you change a setting.
Todo
It works - Samples
Comparison to other frameworks
Shiny
Makes the plots width responsive by default and recommends setting a height. Wish we did the same. Its a shame everything is fixed size by default. See https://shiny.posit.co/py/api/ui.output_plot.html#shiny.ui.output_plot
Streamlit
Streamlit is also width responsive by default.