-
-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bokeh SplinePlot handles multiple cubic splines #1529
Conversation
if len(vs) != 4: | ||
skipped = len(vs) > 1 | ||
continue | ||
xs, ys = vs[:, 0], vs[:, 1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe zip the string keys and values and loop over them to append?
Looks good! Not sure what unit tests could be added and I made one comment to try to avoid all the lines using |
Simplified the SplinePlot implementation. We could expand on the Spline Element notebook with the hope that they will be tested eventually. |
Looks good! |
Looks good! I'll merge once the tests are green. |
Tests have passed. Merging. |
The bokeh bezier glyph supports cubic splines, by reading the matplotlib based spline codes we can easily split a set of cubic splines and draw them correctly with bokeh. This PR adds supports for drawing multiple cubic splines in this way. Splines of length 1 are simply ignored, while any other splines will raise warning. Briefly I thought I could handle quadratic and linear splines as well but that does not seem to be the case. Also adds support for instantiating and plotting empty splines with
hv.Spline(([], []))
.Here's an example: