Add quiver trace type for vector field visualization by degzhaus · Pull Request #7710 · plotly/plotly.js
This PR adds a new quiver trace type to Plotly.js for visualizing 2D vector fields using arrows.
Plotly.newPlot('div', [{
type: 'quiver',
x: [0, 1, 2],
y: [0, 1, 2],
u: [1, 0, -1], // x-component of vectors
v: [0, 1, 0], // y-component of vectors
sizemode: 'scaled', // 'scaled' | 'absolute' | 'raw'
sizeref: 0.5,
anchor: 'tail', // 'tail' | 'tip' | 'center'
colorscale: 'Viridis',
line: { width: 2 }
}]);