Mercurial > octave
changeset 32038:29671873411a
__quiver__.m: Honor scaling factor input for single quiver arrow (bug #39552)
* scripts/plot/draw/private/__quiver__.m: Change scaling factor check to
include cases where there is only one quiver arrow.
* etc/NEWS.9.md: Note quiver change under General Improvements.
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Wed, 19 Apr 2023 10:36:29 -0400 |
parents | 619e2314ebba |
children | 01868cd10060 |
files | etc/NEWS.9.md scripts/plot/draw/private/__quiver__.m |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/NEWS.9.md Tue Apr 18 19:56:31 2023 -0700 +++ b/etc/NEWS.9.md Wed Apr 19 10:36:29 2023 -0400 @@ -19,6 +19,9 @@ the number of decimal places (the fourth input) retains old behavior for backward compatibility, except that non-integer inputs will no longer error. +- `quiver` now honors the scaling factor input when there is only a single +arrow, whereas the factor was previously ignored in that case. + ### Graphical User Interface ### Graphics backend
--- a/scripts/plot/draw/private/__quiver__.m Tue Apr 18 19:56:31 2023 -0700 +++ b/scripts/plot/draw/private/__quiver__.m Wed Apr 19 10:36:29 2023 -0400 @@ -149,7 +149,7 @@ else len = max (sqrt (u(:).^2 + v(:).^2)); endif - if (len > 0 && autoscale && numel (u) > 1) + if (len > 0 && autoscale && numel (u) >= 1) if (isvector (x)) nx = ny = sqrt (length (x)); else