3D scatter plot in a Tab

Hi All,

I have used the example

and managed to visualize a 3D surface using Bokeh. However, I would like to add that Figure in a Tab using the Panel. When I try that, the plot is not generated anymore but no error is thrown. My guess is, that wrapping a JS library is not available in a Tab.

Is there any other fallback solution? For example, is it possible to use Holoviews, to generate the 3D plot with Matplotlib, export the HTML and then use it in Bokeh? Div β€” HoloViews 1.14.5 documentation

Thanks

My guess is, that wrapping a JS library is not available in a Tab.

I would be very surprised if this has any bearing. In general it’s difficult to offer advice or suggestions without a Minimal Reproducible Example

Is there any other fallback solution? For example, is it possible to use Holoviews, to generate the 3D plot with Matplotlib, export the HTML and then use it in Bokeh?

You could certainly display any MPL output as an RGBA image in a a Bokeh plots, but it is probably easier use Panel to coordinate Bokeh and MPL content together. (But those questions should be directed at the Holoviz Discourse)

Found the solution
The ColumnDataSource needs to be instantiated with some dummy data in order for the JS code to perform properly

temp = np.array([0, 1]).tolist()
self.data_source = ColumnDataSource(dict(x=temp, y=temp, z=temp, style=temp))