Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2k
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 ourterms of service andprivacy 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?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
dfd3c81 to9463b3fComparedegzhaus commentedOct 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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) |
emilykl commentedOct 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 toa32678dComparedegzhaus commentedOct 22, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 to02c37f5Compareemilykl commentedOct 22, 2025
@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:
|
degzhaus commentedOct 22, 2025
Amazing, thank you so much for taking a look and providing great guidance, Emily! Looking forward to spinning a cycle on this feedback. |
emilykl commentedOct 22, 2025
@degzhaus One more comment — it would be great to include colorscale attributes in |
feea298 tof3ae9e2Compare60ca5c5 toa008dabComparedegzhaus commentedNov 30, 2025
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. |
emilykl commentedDec 3, 2025
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. |
60d1da9 toa8f8381Comparegpdf commentedDec 18, 2025
69947b2 tob93b445Comparegpdf commentedDec 18, 2025
Perhaps for future readers' clarity of understanding,@degzhaus , you could edit the description at the top of the PR to say:
in the two places it appears, so that the as-merged plot type appears there. |
b93b445 to0252e03Comparedegzhaus commentedDec 19, 2025
Great catch, thank you so much,@gpdf ! Updated per your recommendation, and did a little review/revision based on changes made during the review process as well. |
degzhaus commentedDec 19, 2025
Hey there,@emilykl, hope you're having a wonderful week! I rebased, cleaned up some code, and added some tests here: Thanks again for everything! |
gpdf commentedDec 19, 2025
I really appreciate all the effort in polishing, and very much look forward to using this. |
Uh oh!
There was an error while loading.Please reload this page.
Overview
This PR adds a new
quivertrace type to Plotly.js for visualizing 2D vector fields using arrows.Features
x,ycoordinates with direction/magnitude fromu,vcomponentsscaled(normalized),absolute, orrawvector lengths viasizemode/sizereftail,tip, orcenter/cm/middlecarray)line.*attributesarrowsizehovertemplate, point selectionx,y,u,v, andcarraysAPI
Screenshots
Examples taken fromplotly.com/python/quiver-plots
Gist with example code
Basic Quiver Plot
With Colorscale
Testing
Files Changed
New files (
src/traces/quiver/)index.js- Trace module definitionattributes.js- Attribute schemadefaults.js- Default value handlingcalc.js- Data calculationplot.js- SVG renderingstyle.js- Stylinghover.js- Hover behaviorselect_points.js- Selection supportevent_data.js- Event data formattingformat_labels.js- Label formattingModified
lib/index.js&lib/index-strict.js- Build integrationTests
test/jasmine/tests/quiver_test.js- Unit teststest/image/mocks/quiver_*.json- 9 mock filestest/image/baselines/quiver_*.png- Baseline images