Automatic cmap for single color line with datashade = True
I was trying to change the color of a line in hvPlot with datashade=True, i thought it was as simple as passing the bokeh option line.opts('line_color' = 'white') but i got the following error : ValueError: Unexpected option ‘line_color’ for RGB type across all extensions. No similar options found.”. The workaround is to add cmap = ['color'] argument to the hvPlot call(as discussed in here: https://discourse.holoviz.org/t/unexpected-option-line-color-for-rgb-type-across-all-extensions-no-similar-options-found/188). So, it would be a nice little addition to hvPlot to do that automatically when passing a 'line_color' argument in opts when dealing with single color lines with datashade = True.
@philippjfr can correct me, but I think this is part of a longstanding issue of applying style options to datashaded images/RGBs. In other words, it would be quite a lot of work at the holoviews level.
This is for hvPlot, which already maps the arguments provided into the equivalent HoloViews options or operation arguments, so it's not related to the general difficulty of making mappings from options to operations in HoloViews. The issue here is just of keeping a consistent API closely tied to the Pandas .plot() API, which was written for Matplotlib, not Bokeh. So I would think the option should be spelled as in Matplotlib, which I think is color, not line_color? And in that case, the proposal would be to accept color and pass it down to cmap? Seems reasonable, though it's ambiguous whether it should be passed to cmap as a list as above (which disables colormapping, using a single color for all rendered pixels), or if it should be passed as a single color name (which will then use alpha to do colormapping for that single color).
I don't know if its relevant, but i passed the cmap argument as list to keep consistency with the Colorcet palettes which i was using in another part of the code. I can't remember if it works just passing the color in cmap.