-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Add quiver trace type for vector field visualization #7584
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: master
Are you sure you want to change the base?
Conversation
dfd3c81 to
9463b3f
Compare
|
Hello, I am new to this project and attempting to contribute my first PR. Unfortunately, I am struggling to get the build to pass. Specifically, the I tried running But still encountering the issue. Any insight would be greatly appreciated. Thank you! Edit: tagging a few recent commiters for visibility, thanks so much! (cc @camdecoster @alexshoe @emilykl) |
|
Hi @degzhaus, thank you for working on this contribution! As it stands currently, the devtools dashboard needs to be running in order for You can also download |
b07de7b to
a32678d
Compare
Thank you so much, @emilykl! That was very helpful and unblocked me.
Edit: @emilykl i figured it out! Pardon my flailing at last night. So exciting! I have a couple of tests to add and this will be ready for review. Thanks again for your insights and help! |
64cf31d to
02c37f5
Compare
|
@degzhaus Great news, glad you're unblocked! Thank you for your work on this. Quiver is a plot type we've gotten a lot of requests for. A few high-level comments on the API:
|
Amazing, thank you so much for taking a look and providing great guidance, Emily! Looking forward to spinning a cycle on this feedback. |
|
@degzhaus One more comment — it would be great to include colorscale attributes in |
Thank you for your help and direction, @emilykl ! Addressed this feedback with the following commits: |
Another great idea, thank you, @emilykl ! Added here: |
Thank you for this idea, @gpdf ! Added here: |
|
Great news @degzhaus! I've started looking at the code and I'll get back to you soon with another round of review. One quick question: your PR description refers to some Jasmine test files and image mocks which I don't see in the diff, did you maybe forget to push some files? |
feea298 to
f3ae9e2
Compare
60ca5c5 to
a008dab
Compare
|
Pardon the delay, @emilykl, i was finally able to make time to clean this up. I removed some of my recent comments/questions because they were noise around me understanding how to work with the Thanks again for all your help with this PR! Excited for next steps. |
|
Hi @degzhaus ! I'm aiming to give this another review by the end of the week. Sorry for the delay in getting back to you — looking forward to it! Thanks for your work so far. |
Overview
This PR adds a new
scatterquivertrace type to Plotly.js for visualizing vector fields. The implementation includes:scatterquiverfor quiver/vector field plotsFeatures
Screenshots
Examples taken from:
https://plotly.com/python/quiver-plots/
Here is a gist of the 2 plots used in the examples:
https://gist.github.com/degzhaus/2fb3c08cbc228682125f94bce52ba7d1
Basic Quiver Plot (
0-quiver-meshgrid.html)Adding

colorscale: [[0, 'blue'], [1, 'blue']],tovar data = [{:Quiver Plot with Points (
1-quiver-gradient.html)Adding
colorscale: 'Viridis',tovar data = [:Testing
Files Added/Modified
src/traces/scatterquiver/- Complete trace implementationlib/index.js&lib/index-strict.js- Build integrationtest/jasmine/tests/scatterquiver_test.js- Unit teststest/image/mocks/scatterquiver_*.json- Mock datatest/jasmine/assets/mock_lists.js- Test integrationDraft Log
draftlogs/7584_add.md- Changelog entryThis addresses the need for vector field visualization in Plotly.js, similar to matplotlib's quiver plots.