hvplot
hvplot copied to clipboard
Add support for plotting a slope on scatter points
HoloViews has the Slope element that displays a line with a gradient and a y-intercept. It also has a from_scatter class method that fits the line based on a Scatter element (using np.polyfit(x, y, 1, full=True)). This could be exposed in hvPlot with a slope parameter accepting:
-
True: gradient of 1 and intercept of 0 -
'infer': usefrom_scatter - dict: custom gradient and intercept
Note that at the moment HoloViews Slope doesn't have a Plotly implementation, but this shouldn't be too hard to implement if required.