This works absolutely fine for me:
curve_spectrum = hv.Curve(data_s, 'x', 'y')
opts.Curve(line_width=10, line_color='red', tools=['hover'])
The getting started guide and user guide are the main explanations here. If you think they are not very intuitive, feedback would be very much appreciated.
Can .opts bet set to a new one with = ?
No, .opts is a method, assigning it won’t do anything.
Does .opts() return a copy of the object who’s opts were changed ?
.opts is one of the few methods in HoloViews which modify an object in place.
Why are opts always changed via the overlay ?
They aren’t, the
hv.opts.<Element>() object just let’s you specify objects on a composite object, if you have a single element it’s fine to simple set the options directly on it, e.g. this is a perfectly valid way to set options on a Curve:
I found opts and styling attribute logic very obscure.
Everyone has different experiences, and HoloViews is certainly a very different way to think about visualization. The options system is one of the ways HoloViews supports having different plotting backends with very different sets of valid options.
Do you have more doc on when it is required to set the backend or the extension ?
If you want to visualize anything it is always required to select a plotting extension and all our docs start with a call to the extension. I do think this aspect is very much under-documented however and should be probably be addressed in the very first getting started guide.