0

Let us suppose that I created a Bokeh figure as such

fig = figure(title="Any title", width=1600, height=800)

and that I created a Holoviews Sankey chat from a Pandas DataFrame as such

sankey = hv.Sankey(data)
sankey.opts(width=1200, height=600)

How can I insert that chart in that figure?

  • 1
    `hv.Sankey` can generate it's own Bokeh figure that you can access, and you could insert that figure into a Bokeh *layout*, but it's not possible to "insert" one figure into another existing figure. – bigreddot Jan 12 '22 at 19:24
  • See http://holoviews.org/user_guide/Plotting_with_Bokeh.html#working-with-bokeh-directly for how to generate a Bokeh figure from a HoloViews object like `sankey`. – James A. Bednar Jan 13 '22 at 04:16
  • The problem is that if I simply say `sankey = hv.Sankey(data)` `fig = hv.render(sankey)` `show(fig)` I get a plot larger than the canvas, so I have to zoom to see the whole plot. The problem are the labels on the right side. They are "truncated". I need to tell that the plot itself is 1600 wide but inside a canvas that is 1800 wide. How? – Dario de Judicibus Jan 14 '22 at 12:44

0 Answers0