Add a New Comment (Rich Markup)
Seems to work with the example from this bug report. Marking as Fixed and closing report.
ok. pushed the following change to default: https://hg.savannah.gnu.org/hgweb/octave/rev/7dcb6b4a4218 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.
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 endif unwind_protect_cleanup
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"; endif endif
setting arrowhead linestyle no None. But at the end of quiver style processing, remaining properties are caught by
if (! isempty (args)) set (hg, args{:}); endif
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.
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.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
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.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 5 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.12