-
-
Notifications
You must be signed in to change notification settings - Fork 409
Open
Labels
TRIAGENeeds triagingNeeds triaging
Description
I was trying to get the docstring including style options and plot options programmatically for usage with holoviz-mcp. I spend a long time before I realized that hv.help(hv.Curve) works very differently whether you are in a notebook or using plain python.
It seems the InfoPrinter is only configured and used in a notebook. Which makes hv.help work very differently.
holoviews/holoviews/ipython/magics.py
Line 30 in fc6663b
| InfoPrinter.store = Store |
Reproduce
When you run
import holoviews as hv
hv.extension("bokeh")
hv.help(hv.Curve)You see
Workaround: Set InfoPrinter.store manually
import holoviews as hv
from holoviews.core.pprint import InfoPrinter
from holoviews.core.options import Store
InfoPrinter.store = Store
hv.extension("bokeh")
hv.help(hv.Curve)
Related issues
Wish
In the end the below code should just work for users no matter where they work.
import holoviews as hv
hv.help(hv.Curve, backend='matplotlib')and
from holoviews.core.pprint import InfoPrinter
info = InfoPrinter.info(obj, ansi=False, backend="bokeh", visualization=True, pattern=None, elements=elements_list)
print(info)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
TRIAGENeeds triagingNeeds triaging