octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63582] Octave patch function accepts one inco


From: Liang Tang
Subject: [Octave-bug-tracker] [bug #63582] Octave patch function accepts one incorrect input form and produces incorrect result.
Date: Tue, 27 Dec 2022 15:11:49 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?63582>

                 Summary: Octave patch function accepts one incorrect input
form and produces incorrect result. 
                 Project: GNU Octave
               Submitter: lt1234
               Submitted: Tue 27 Dec 2022 08:11:47 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Missed Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: lt1234
        Originator Email: 
             Open/Closed: Open
                 Release: 7.1.0
         Discussion Lock: Any
        Operating System: Microsoft Windows
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 27 Dec 2022 08:11:47 PM UTC By: Liang Tang <lt1234>
>> which patch
'patch' is a function from the file
C:\Octave\Octave-7.1.0\mingw64\share\octave\7.1.0\m\plot\draw\patch.m

The correct syntax for 3-D patch is patch(x,y,z,color).  I used patch(x,y,z)
instead.  This is an incorrect input.  

There is no error or waning message from this incorrect input. I think there
should be an error message for this wrong input.    

The code did not reject my input and subsequently produced wrong results.  For
the example below, zdata was set to [] when color is absent.  The input patch
did not display for this example.  In other cases, Octave might show patch at
zero z.  


x = [1, 1, 0, 0, 1];
y = [0, 1, 1, 0, 0];
z = [1, 1, 1, 1, 1];
f = figure(1);  
% correct input 
h1=patch(x, y, z, 'b'); get(h1, 'zdata'), 
hold on; 
% incorrect input 
h2=patch(x, y, z     ); get(h2, 'zdata')  

Thanks.  








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63582>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]