I've attached requested output
(file #42360, file #42361)

I've also fixed the issue where the arrowshaft was not scaled when there was just a single vector.

I now have the arrowshaft and the angle that the arrowheads make with the arrowshaft correct, but I still can't figure out the algorithm that Matlab is using for the size of the arrowhead. New test code for Matlab is:

I can't move forward until I see the results from Matlab for the code in comment #12.

Actually, a better test case to run would be

@Richard: Could you try this code?
This should produce a very clean test case without any sqrt(2) factors obscuring the algorithm.

Thanks. It looks like Octave is correctly calculating the length of the arrowshaft, but the arrowhead is too big. At least that points towards which part of the algorithm in _quiver_.m needs modification.

See uploaded file tstquiver2.png
(file #42272)

Could someone with Matlab try this code?
According to the documentation for AutoScale
The idea I'm trying to check is whether AutoScale has a specific case for a single arrow (for which there is no grid).

I would guess arrowhead size is proportional to the vector length when only drawing one arrow. See the MaxHeadSize property, defined as "Maximum size of arrowhead, specified as a scalar value in units relative to the length of the arrow."

@Rik:
(file #42263)

Here is the Quiver Properties:
Dmitri.


Changing category back to "Need Info".
@Clark: Can you start Matlab without any user customizations and see if you get the same size figure?
@Dmitri: It could also be the case that Matlab has special logic for weird corner cases such as this one.

If I try an example from the matlab documentation
https://www.mathworks.com/help/matlab/ref/quiver.html
I get pretty much an identical figure. I think we want a second opinion... Perhaps Clark Dunson has some custom settings?!
Dmitri.


Marking as confirmed. The attached jpg from Matlab shows a much smaller arrowhead.

What does Matlab do? Could someone run the sample code and upload the image that it produces?
For Octave, the arrowhead size is calculated at about 20% of the size of the grid. Since your grid is 1x1 this comes out to about 0.2. That looks big when the axes limits are tight in around the object, but looks okay when the view is larger. Try

Using a simple
quiver(5, 5, 1, 1)
produces an arrow whose head is too large.
