bugGNU Octave - Bugs: bug #64143, quiver: arrowheads visible if...


bug #64143: quiver: arrowheads visible if setting name-value property after linestyle

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Wed 03 May 2023 09:37:34 PM UTC
Category:  Plotting Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  9.1.0 (current default) Planned Release:  9.1.0 (current default)
* Mandatory Fields

Add a New Comment (Rich Markup)

Wed 31 May 2023 12:13:19 AM UTC, comment #4: 

Seems to work with the example from this bug report.  Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Mon 08 May 2023 03:50:50 PM UTC, comment #3: 

ok.  pushed the following change to default:

which makes the comment #2 check in `__quiver__`.  It also adds 'linewidth' to the the base marker object in the update_props subfunction, so that a linewidth property setting will affect the marker as it does in matlab. Added a BIST to quiver to check that, and cleaned up other BISTs as well. passes all tests.

These changes should satisfy this bug report. Marking as Ready for Test.

Nicholas Jankowski <nrjank>
Group Member
Thu 04 May 2023 05:46:22 PM UTC, comment #2: 

the following simple change mostly fixes the example problem. however i just noticed in matlab the linewidth change applies to the marker as well, while it does not in octave. also need to do some other compatibility checking.

diff -r 03fe0b635d2e scripts/plot/draw/private/__quiver__.m
--- a/scripts/plot/draw/private/__quiver__.m    Wed May 03 22:52:33 2023 -0400
+++ b/scripts/plot/draw/private/__quiver__.m    Thu May 04 13:41:35 2023 -0400
@@ -379,6 +379,11 @@

     if (! isempty (args))
       set (hg, args{:});
+      if (have_line_spec)
+        if (! isempty (linespec.marker) && ! strcmp (linespec.marker, "none"))
+          set (h2, "linestyle", "none");
+        endif
+      endif


Nicholas Jankowski <nrjank>
Group Member
Thu 04 May 2023 02:59:12 PM UTC, comment #1: 

looks like quiver correctly processes the "-o" linespec at the front of processing:

    if (have_line_spec)
      if (! isempty (linespec.marker) && ! strcmp (linespec.marker, "none"))
        ls = "none";

setting arrowhead linestyle no None.  But at the end of quiver style processing, remaining properties are caught by  

if (! isempty (args))
  set (hg, args{:});

which applies to all plot lines.  I do note that hg is a hggroup with the three quiver elements as children (basemarker, arrowbody, arrowhead) and nothing else in the plot. might be able to just split that into three separate set statements with a conditional on the arrowhead, if it doesn't break anything else. or maybe better could just conditionally set the arrowhead linestyle back to none after applying all other properties, if that doesn't cause any odd persistent effects.

Nicholas Jankowski <nrjank>
Group Member
Wed 03 May 2023 09:37:34 PM UTC, original submission:  

preparing to push input validation rework for quiver and quiver3.  noticed that while arrowheads turn off for any linestyle with a marker specified, they turn back on if you also supply a name-value pair line style.  in matlab 2023a, the arrowhead stays off. e.g.:

h = quiver (0, 1, 2, 3, "-o")

has a marker with no arrowhead. 

h = quiver (0, 1, 2, 3, "-o", "linewidth", 10)

the arrow body width is increased to 10, the marker stays, but the arrowheads reappeared.

after pushing the other changes along with a xfail BIST for this case, will look to see if its an easy fix.

Nicholas Jankowski <nrjank>
Group Member


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by nrjank (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 project members can vote.





    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-05-31 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 9.1.0 (current default)
    2023-05-08 nrjank StatusNone Ready For Test
        Planned ReleaseNone 9.1.0 (current default)

    Back to the top

    Powered by Savane 3.12