You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HoloViews operations already accept Parameter values, making it simple to instantiate widgets and connect them to the operation arguments in a way that re-runs the operation when the widget updates:
import os, colorcet, holoviews as hv, panel as pn, numpy as np
from holoviews.operation.datashader import rasterize, shade, spread
from collections import OrderedDict as odict
hv.extension('bokeh')
points = hv.Points(np.random.rand(500,2))
cmaps = odict([(n,colorcet.palette[n]) for n in ['fire', 'bgy', 'bgyw', 'bmy', 'gray', 'kbc']])
cmap = pn.widgets.Select(name='Colormap', options=cmaps)
shade(rasterize(points), cmap=cmap.param.value)
Given how obscure the syntax for doing it is and that many people can otherwise use Panel without knowing anything about Param, it would be nice if people could simply pass the widget instead:
shade(rasterize(points), cmap=cmap)
The text was updated successfully, but these errors were encountered:
HoloViews operations already accept Parameter values, making it simple to instantiate widgets and connect them to the operation arguments in a way that re-runs the operation when the widget updates:
Given how obscure the syntax for doing it is and that many people can otherwise use Panel without knowing anything about Param, it would be nice if people could simply pass the widget instead:
The text was updated successfully, but these errors were encountered: