GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update quiver trace API by emilykl · Pull Request #7945 · plotly/plotly.js

Conversation

@emilykl

@emilykl emilykl commented Aug 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Closes #7944

  • rename sizeref attribute to lengthfactor (since sizeref for other traces works differently, as a divisor rather than a multiplier, we shouldn't use the same name here)
  • rename sizemode to lengthmode (to parallel lengthfactor and because it's really about vector length rather than size)
    • accepted values 'scaled' and 'raw' remain the same
  • rename anglemode to arrowref
    • accepted values 'data' and 'paper' remain the same

Also:

  • Fix incorrect default for arrowref (was 'axis' which is not an accepted value; changed to 'data')
  • Improve lengthmode: 'scaled' arrow length calculation
  • Update Jasmine tests and image tests accordingly
  • Update some other attribute descriptions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@emilykl
emilykl changed the base branch from master to v4.0 August 6, 2026 23:49
@emilykl
update attribute names in src/traces/quiver/
5ab9743
@emilykl
emilykl force-pushed the update-quiver-api branch from 847fd88 to 66fd95f Compare August 7, 2026 00:04
emilykl added 4 commits August 7, 2026 10:03
@emilykl
regenerate types and plot-schema
003062c
@emilykl
update jasmine tests
d3d7046
@emilykl
update image mocks and baselines
00ba1a5
@emilykl
add draftlog
7c9f063
@emilykl
emilykl force-pushed the update-quiver-api branch from 66fd95f to 7c9f063 Compare August 7, 2026 14:05
archmoj
archmoj reviewed Aug 10, 2026
View reviewed changes
Comment thread draftlogs/7945_change.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

camdecoster
camdecoster reviewed Aug 10, 2026
View reviewed changes

@camdecoster camdecoster left a comment

Copy link
Copy Markdown
Contributor

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.

I left you a few suggestions. I like the new attribute names.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread draftlogs/7945_change.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/traces/quiver/calc.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/traces/quiver/calc.js Outdated
Comment on lines 118 to 121
// TODO: How to handle the case where there is just one point in a trace,
// or all points have the same x or y value? This will give a boxArea of 0.
// For now I'm going to just normalize to a vector of unit length (1) in that case,
// but that's not a great solution

@camdecoster camdecoster Aug 10, 2026

Copy link
Copy Markdown
Contributor

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.

Can this comment be addressed?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@emilykl emilykl Aug 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

Addressed by 1315d07. I updated the point distance calculation to be more accurate, and as a bonus now it covers the case where all the points are in a horizontal or vertical line.

There's nothing we can do about the case where all points have the same x or y value; I think it's reasonable to just default to 1 in that case.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

camdecoster reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread src/traces/quiver/calc.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/traces/quiver/calc.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/traces/quiver/calc.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/traces/quiver/plot.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/traces/quiver/plot.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

emilykl and others added 3 commits August 21, 2026 16:23
@emilykl @camdecoster
Apply suggestions from code review
a3c5fa2
Co-authored-by: Cameron DeCoster <[email protected]>
@emilykl
rename uvref to arrowref
8e70cff
@emilykl
combine draftlogs
42cfce1
@emilykl
emilykl force-pushed the update-quiver-api branch from b46f29c to 1507db6 Compare August 22, 2026 22:50
@emilykl
fix point distance calculation; it's more accurate now and covers the…
1315d07
… case where all points are in a horizontal or vertical line
@emilykl
emilykl force-pushed the update-quiver-api branch from 1507db6 to 1315d07 Compare August 22, 2026 22:59
@emilykl emilykl added the no-draftlog The associated PR doesn't require a draftlog and the CI check will be skipped. label Aug 24, 2026
emilykl added 3 commits August 24, 2026 10:40
@emilykl
update comment
ccb1712
@emilykl
update plot-schema
328ddc4
@emilykl
update image baselines
a22f34e
@CAOShurong CAOShurong mentioned this pull request Aug 24, 2026
[BUG]: Automargin for quiver plots is a little off with arrowref: 'paper' #7979
Open
camdecoster
camdecoster approved these changes Aug 24, 2026
View reviewed changes

@camdecoster camdecoster left a comment

Copy link
Copy Markdown
Contributor

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.

arrowref is also a good choice.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/traces/quiver/calc.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/traces/quiver/calc.js
* D = (dX + dY + sqrt((dX - dY)^2 + 4N * dX * dY)) / (2 * (N - 1))
* which is the forumla we'll use below.
*
* Note: this formula was derived and documented by a human ;)

@camdecoster camdecoster Aug 24, 2026

Copy link
Copy Markdown
Contributor

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.

👏

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@emilykl
cleanup
74a7200
@emilykl

emilykl commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

arrowref is also a good choice.

Glad you're OK with it. It occurred to me that in the future we may want to add the option to specify vectors by angle and magnitude, rather than u/v, so arrowref seemed more appropriate.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@emilykl
emilykl merged commit 01a6cc4 into v4.0 Aug 24, 2026
324 of 328 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@emilykl
emilykl deleted the update-quiver-api branch August 24, 2026 18:14
@emilykl emilykl mentioned this pull request Aug 28, 2026
Update quiver trace API for clarity and consistency #7944
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@camdecoster camdecoster camdecoster approved these changes
+1 more reviewer
@archmoj archmoj archmoj left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

no-draftlog The associated PR doesn't require a draftlog and the CI check will be skipped.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Update quiver trace API for clarity and consistency

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@emilykl @camdecoster @archmoj
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.