Mercurial > octave
comparison scripts/plot/draw/private/__quiver__.m @ 32084:7dcb6b4a4218
quiver: Marker & arrowhead name/value property style consistency (bug #64134)
* __quiver__.m: Add have_line_spec check after applying any name-value
properties to maintain arrowhead display status.
* __quiver__.m (update_plot): Add linewidth property to base marker object
set call.
* quiver.m: Add BIST to ensure marker properties are updated correctly.
Remove unnecessary strcmp from other BIST assert calls.
* etc/NEWS.9.md: Update description of changes to quiver note under General
Improvements.
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Mon, 08 May 2023 11:49:41 -0400 |
parents | 03fe0b635d2e |
children | 2e484f9f1f18 |
comparison
equal
deleted
inserted
replaced
32083:4e30fd192118 | 32084:7dcb6b4a4218 |
---|---|
377 ## Matlab property, although Octave does not implement it. | 377 ## Matlab property, although Octave does not implement it. |
378 addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); | 378 addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); |
379 | 379 |
380 if (! isempty (args)) | 380 if (! isempty (args)) |
381 set (hg, args{:}); | 381 set (hg, args{:}); |
382 if (have_line_spec && ! isempty (linespec.marker) && ... | |
383 ! strcmp (linespec.marker, "none")) | |
384 set (h2, "linestyle", "none"); | |
385 endif | |
382 endif | 386 endif |
383 | 387 |
384 unwind_protect_cleanup | 388 unwind_protect_cleanup |
385 set (hax, "nextplot", hstate); | 389 set (hax, "nextplot", hstate); |
386 end_unwind_protect | 390 end_unwind_protect |
495 kids = get (h, "children"); | 499 kids = get (h, "children"); |
496 | 500 |
497 set (kids([3 2]), {"color", "linestyle", "linewidth"}, | 501 set (kids([3 2]), {"color", "linestyle", "linewidth"}, |
498 get (h, {"color", "linestyle", "linewidth"})); | 502 get (h, {"color", "linestyle", "linewidth"})); |
499 set (kids(2), "visible", get (h, "showarrowhead")); | 503 set (kids(2), "visible", get (h, "showarrowhead")); |
500 set (kids(1), {"color", "marker", "markerfacecolor", "markersize"}, | 504 set (kids(1), {"color", "marker", "markerfacecolor", "markersize", ... |
501 get (h, {"color", "marker", "markerfacecolor", "markersize"})); | 505 "linewidth"}, get (h, {"color", "marker", "markerfacecolor", ... |
506 "markersize", "linewidth"})); | |
502 | 507 |
503 endfunction | 508 endfunction |