[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59695] Strange quiver plot with integer data
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #59695] Strange quiver plot with integer data type |
Date: |
Tue, 15 Dec 2020 20:44:26 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36 |
Follow-up Comment #1, bug #59695 (project octave):
The quiver function is not designed for integer data types which have specific
rules for multiplication, division, addition, subtraction when used in
combination with floating point numbers. Instead, use one of the functions
which removes the fractional part from the floating point number without
changing the type. For example, fix(), floor(), ceil(), or round(). Using
quiver(X,Y, round (U), round (V),0)
should do what you want.
Matlab handles it by converting whatever data you give it to floating point
with double() before plotting it. I suppose Octave could do the same thing.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59695>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/