I am using HoloViews 1.15.1 with Miniconda Python 3.8.13 on Ubuntu 20.04.(I am not using Jupyter notebook.)
The following code runs without an exception but does not show a figure window.
import holoviews as hv
import matplotlib.pyplot as plt
hv.extension('matplotlib')
xs = range(-10,11)
ys = [100-x**2 for x in xs]
curve = hv.Curve((xs, ys))
hv.render(curve)
plt.show()
Is this the correct way of using HoloViews? I am new to HoloViews and I’ll report it if it’s confirmed to be a bug.
As a side note, I hacked and got a remedy using an undocumented method MPLRenderer.show()
like this.
renderer = hv.renderer(hv.Store.current_backend)
renderer.show(curve)
The same remedy can be applied to HvPlot like the following.
import pandas as pd
from bokeh.sampledata.stocks import MSFT
import holoviews as hv
import hvplot
hvplot.extension('matplotlib')
df = pd.DataFrame(MSFT)
overlay = df.hvplot.area(x='date', y=['open', 'close'])
renderer = hv.renderer(hv.Store.current_backend)
renderer.show(overlay)