zincware / MDSuite

A post-processing engine for particle simulations
https://mdsuite.readthedocs.io/
Eclipse Public License 2.0
36 stars 7 forks source link

Plots are not displayed properly in jupyter #585

Closed PythonFZ closed 1 year ago

PythonFZ commented 1 year ago

Describe the bug There seems to be a change in the latest bokeh plots version that causes plots to be not displayed property.

Should we try to fix the plots in Bokeh or move on to plotly?

christophlohrmann commented 1 year ago

I have never used the interactive plot features so I do not have an opinion

SamTov commented 1 year ago

In the long run I will move to plotly, however, for the time being, I am fairly sure this is due to our own rescaling of the plots and therefore can likely be quickly resolved

SamTov commented 1 year ago

I have found Bokeh 2.4.3 works okay with my Jupyter, upgrading to > 3.0 I am finding that the BokehJS is trying to render with 2.4.3 still leaving no plots.

So with Bokeh 3.03 and BokehJS 3.03 it produces these mini plots.

Problem was our rescaling:

# grid = gridplot(figures, ncols=3, sizing_mode="scale_both")
grid = gridplot(figures, ncols=3)

It is back to normal size with this configuration. The only difference, which I like, is that it pushes them over the page line to keep all plots the same size which means you can scroll across the page and it doesn't force all the plots to fit within the screen margin. It makes for a much nicer experience when looking at ADFs for example.