import holoviews as hv from holoviews import opts hv.extension('matplotlib')
Spline annotation is used to draw cubic Bezier curves. In the overlay below, the spline is in green and the control points are shown by the light grey line:
points = [(-0.3, -0.3), (0,0), (0.25, -0.25), (0.3, 0.3)] spline = hv.Spline((points, [1,4,4,4])) (spline * hv.Curve(points)).opts( opts.Curve(color='#D3D3D3'), opts.Spline(linewidth=6, edgecolor='green'))
The first argument to
Splines are the control point positions and the integers in the second list are the control codes, as documented in the matplotlib splines documentation.
For full documentation and the available style and plot options, use