-
-
Notifications
You must be signed in to change notification settings - Fork 407
WIP: Streamlines element #5242
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
base: main
Are you sure you want to change the base?
WIP: Streamlines element #5242
Conversation
Cool! For most elements we have a default border, but I believe that is set to zero for RGB, HSV, Raster, VectorField, and Image elements. I'd propose that the border be zero for Streamlines and Contour elements as well. |
That's easily configured by overriding the |
Thanks for the PR @poplarShift! One of the tests in failing because of |
Thanks for the heads up, will look at that next time I'm in there! |
@poplarShift this is a very nice feature that we would like to put in the next major release, do you need any help to complete your PR? |
Hi @maximlt
|
Hey thanks for the update! I'll ping @jlstevens who is more likely to be able to answer your questions. |
Thanks for the PR, this looks great!
If you are worried about licensing issues, I'm sure it is ok. Ideally this code would be public API importable from Bokeh, but in this case, inlining the code is also fine.
Not that I am aware of, but I'll go ahead and ping @mattpap for feedback on these two bokeh related questions. Also, as long as arrows support can be added as a plot option later, I don't think those are necessary for the first release of this element.
I've got no immediate insights into this padding issue, I'm afraid! Happy to help track this down once we are happy with everything else.
As long as the constructor of the element doesn't change (i.e. the element semantics are clear), I agree this can be in a future PR. Perhaps you could just give an example of what you think this data would look like and then we can postpone supporting that format till later? |
Would have to know where and how you set it. I would recommend setting it as a parameter on the plotting class, i.e.:
|
Thanks for weighing in, that's exactly what I did. Will have to look at that again then... |
It's from the bokeh documentation https://docs.bokeh.org/en/latest/docs/gallery/streamline.html, so not directly from the codebase.
The current gridded input format is
so yes, that would have to change if we were instead to pass unstructured (columnar) data. We could reconstruct the regular grid by doing some binning/averaging preprocessing internally to make the current streamline integration algorithm work. Integrating directly on unstructured data is a bit more involved but I haven't actually done a lot of research on other implementations. |
Arrow heads can be added to a subset of glyphs via glyph decorations. Currently only |
I'm starting to need this so had a go at #4837 (just blindly copying the bokeh example).
It might be good to eventually include points at either the origin or destination of a given streamline. It should be easy enough but I've become a bit rusty in holoviews...
PS: I'm not at the university anymore so got to be counting hours now, but still interested in getting this in.
Other issues:
MWE: