bugGNU Octave - Bugs: bug #53187, quiver3 draws z-axis aligned...

 
 

bug #53187: quiver3 draws z-axis aligned arrows with no visible head (line aligned to stem)

Submitter:  None
Submitted:  Mon 19 Feb 2018 04:11:58 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Confirmed Assigned to:  None
Originator Name:  Desmond Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 4.2.1
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 Feb 2024 09:12:32 PM UTC, comment #5: 

this still exists in octave 9.0.90

a mwe is to simply plot:

vz = quiver3(0,0,0,0,0,1)

see attached.

the line properties for the arrow are:


>> get(get(vz, 'children'), 'xdata')
ans =
{
  [1,1] = 0
  [2,1] =

       0     0     0   NaN

  [3,1] =

       0     0   NaN

}

>> get(get(vz, 'children'), 'ydata')
ans =
{
  [1,1] = 0
  [2,1] =

       0     0     0   NaN

  [3,1] =

       0     0   NaN

}

>> get(get(vz, 'children'), 'zdata')
ans =
{
  [1,1] = 0
  [2,1] =

     0.6000   0.9000   0.6000      NaN

  [3,1] =

          0   0.9000      NaN


so the head is child #2, a 3-point line. the x and y values are currently being calculated such that both head segments lie along the arrow stem.  Matlab example shown as well. head is clearly calculated wider, to about +/-0.15 (axes scale make them look rather large)


Nicholas Jankowski <nrjank>
Group Member
Tue 20 Feb 2018 05:56:39 AM UTC, comment #4: 

Fetched image from stackoverflow and attached to this report so tha it doesn't get lost.

It appears that the Z-axis arrowhead face is set at 45 degrees to the X-Y plane which is what I wanted to know.


Rik <rik5>
Group administrator
Tue 20 Feb 2018 05:35:09 AM UTC, comment #3: 
Anonymous
Tue 20 Feb 2018 05:32:46 AM UTC, comment #2: 

Someone tested it in Matlab when I asked on Stack Overflow. It worked as expected. I've run many versions of the code on Octave and it never shows the arrows.

Anonymous
Tue 20 Feb 2018 05:13:48 AM UTC, comment #1: 

Confirmed.

What image does Matlab produce for the same example code?

Rik <rik5>
Group administrator
Mon 19 Feb 2018 04:11:58 PM UTC, original submission:  

quiver3 will not display arrowheads for vectors which exist only in the z axis (ex. <0, 0, 1>) despite set(vector, 'ShowArrowHead', 'on'). Every angle has been checked. See attached images.

Code example:

X = xlabel("X");
Y = ylabel("Y");
Z = zlabel("Z");
axis([-1 1 -1 1 -1 1],'square');

hold on
vx = quiver3(0,0,0,1,0,0)
hold on
vy = quiver3(0,0,0,0,1,0)
hold on
vz = quiver3(0,0,0,0,0,1)


set([vx,vy,vz], 'Color', 'black');
set([vx,vy,vz], 'LineWidth', 4);
set([vx,vy,vz], 'ShowArrowHead', 'on');
grid on

view([45,30]);


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #55706:  quiver_nohead.png added by nrjank (27KiB - image/png - matlab plot from quiver3(0,0,0,0,0,1) with head)
file #55707:  quiver_nohead_matlab.png added by nrjank (19KiB - image/png - matlab plot from quiver3(0,0,0,0,0,1) with head)
file #43370:  quiver3.matlab.png added by rik5 (61KiB - image/png)
file #43357:  glitch.png added by None (20KiB - image/png)
file #43358:  glitch2.png added by None (19KiB - image/png)
file #43359:  glitch3.png added by None (20KiB - image/png)
file #43360:  trial.png added by None (20KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-15 nrjank Operating SystemMicrosoft Windows Any
    2024-02-15 nrjank Attached File- Added quiver_nohead.png, #55706
        Attached File- Added quiver_nohead_matlab.png, #55707
        SummaryWill not display arrows for quiver3 in z axis quiver3 draws z-axis aligned arrows with no visible head (line aligned to stem)
    2018-02-20 rik5 Attached File- Added quiver3.matlab.png, #43370
    2018-02-20 rik5 StatusNone Confirmed
    2018-02-19 None Attached File- Added glitch.png, #43357
        Attached File- Added glitch2.png, #43358
        Attached File- Added glitch3.png, #43359
        Attached File- Added trial.png, #43360

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code