///|
/// Draw arrows for a vector field sampled at paired x/y positions.
pub fn Figure::quiver(
self : Figure,
xs : Array[Double],
ys : Array[Double],
us : Array[Double],
vs : Array[Double],
color~ : String = "",
label~ : String = "",
) -> Unit raise @core.DataError {
self.axes().quiver(xs, ys, us, vs, color~, label~)
}
///|
/// Draw arrows for a vector field sampled at paired x/y positions.
pub fn Axes::quiver(
self : Axes,
xs : Array[Double],
ys : Array[Double],
us : Array[Double],
vs : Array[Double],
color~ : String = "",
label~ : String = "",
) -> Unit raise @core.DataError {
if xs.length() != ys.length() {
raise @core.DataError::LengthMismatch(
expected=xs.length(),
actual=ys.length(),
)
}
if xs.length() != us.length() {
raise @core.DataError::LengthMismatch(
expected=xs.length(),
actual=us.length(),
)
}
if xs.length() != vs.length() {
raise @core.DataError::LengthMismatch(
expected=xs.length(),
actual=vs.length(),
)
}
let points = Array(capacity=xs.length())
let vectors = Array(capacity=xs.length())
for index in 0..