Holoviews Layout not Rendering in Panel

Looking for advice on why my Holoviews layout object isn’t showing up in my Panel-based app. First time I’ve attempted to do this.

Here’s the gist of what I’m doing:

  • In data_finder.py I import my new library via import plotlib as pl
  • In data_finder.py, I have class DataFinderApp
  • In DataFinderApp, __init__() includes the following:
    • self.plot_pane = pn.Row(), and
    • app = pn.template.MaterialTemplate(title='data_finder'), and
    • tabs = Tabs((...), (...), ('Data Plotting', Column(Row(...), self.plot_pane)), and
    • app.main.append(tabs), and
    • app.servable()
  • DataFinderApp also has a button that executes:
def build_plot(self, event):
        self.multiplot = pl.MultiPlot(self.data_manager.data_dict)
        self.plot_pane = pn.Row(self.multiplot.layout)

plotlib.py includes:


class MultiPlot:
   __init__(self, data, ...):
      self.overlay = ...
      self.layout = hv.Layout(self.overlay).cols(1)

When I click the button to “build_plot”, nothing seems to happen, and no errors are seen on the console, so I’m at a loss how to troubleshoot this.

Obviously I’m trying to get help without posting the entirety of my code, and also I’m avoiding creation of some minimum reproducible code.

Am I doing something obviously wrong, I my attempt to show this Holoviews “layout” in my Panel app?

The only suggestion I can give you is to make a print statement to see if the build_plot is called and go from there.

I don’t think there is a way to troubleshoot your problem without having some kind of MRE. Even if it is just for yourself, it is a great way to reduce the problem to its essence.

Maybe you have to call pn.extension or hv.extension only in the main python file. I saw someone who has problems with calling pn.extension in a module.

Anyway, as @Hoxbro mentioned, without a MRE is difficult to provide much more help

1 Like

@Hoxbro @nghenzi I’ll try to distill things down to an MRE. Thanks!

1 Like