Reputation: 350
I'm plotting some scatter plots using holoviews and using hv.slope to compute the the slope for me. Code is as follows:
Scatter_test = hv.Scatter(Scatter_Brand, vdims=['Brand'], kdims=['x', 'y'])
Scatter_plot = Scatter_test * hv.Slope.from_scatter(Scatter_test).opts(tools=['hover'])
However, does anyone know how I can get the computed coeffcient for the slope that holoviews computes and plots for me to appear on the slope that has been calculated? I've tried included the hover tool but no luck. Is it possible, or does anyone know of a work around?
Kind regards
Upvotes: 1
Views: 145
Reputation: 1
Please try if following works:
slp = hv.Slope.from_scatter(Scatter_test)
print ( slp.slope, slp.y_intercept)
You might be able to expore the attributes and functions using:
slp?
Upvotes: 0