I have been struggling setting
opts
such asline_color
or other more niche options while overlaying geofeatures and other plots
You can target specific elements: Overlay([hv_obj1, hv_obj2]).opts("Curve", line_color="red")
Collecting more best practices things here:
- Generally, try to replace HoloViews usage with hvPlot. At a certain point of complexity, such as with the use of ‘.select’, it might be better to stick with HoloViews.
- Almost always, try to replace the use of
datashade
withrasterize
(read this page). Essentially,rasterize
allows Bokeh to handle the colormapping instead of Datashader. - Remove all
pn.interact
usage - Try to avoid
.param.watch()
usage. This is pretty low-level and verbose approach Prefer usingpn.bind()
. Read this page for explanation. - For apps built using a class approach, when they create a
view()
method and call it directly, update the class by inheriting frompn.viewable.Viewer
and replaceview()
by__panel__()
. Here is an example.