Add support for plotting a slope on scatter points
Open
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 124
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
HoloViews has the [Slope](https://holoviews.org/reference/elements/bokeh/Slope.html) 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'`: use `from_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.
Contributor guide
Assessment
This issue has not been assessed yet.