Spline#
Download this notebook from GitHub (right-click to download).
- Title
- Spline Element
- Dependencies
- Bokeh
- Backends
- Bokeh
- Matplotlib
import holoviews as hv
from holoviews import opts
hv.extension('bokeh')
The 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)]
overlay = hv.Spline((points,[])) * hv.Curve(points)
overlay.opts(
opts.Curve(color='#D3D3D3'),
opts.Spline(color='green', line_width=6))
Note that the Bokeh Spline
does not support the same control codes as the matplotlib version which is why the codes are supplied above as an empty list.
For full documentation and the available style and plot options, use hv.help(hv.Spline).
This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.
Download this notebook from GitHub (right-click to download).