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

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

[Octave-bug-tracker] [bug #49852] Incorrect plot with trisurf + axis equ


From: Bill Greene
Subject: [Octave-bug-tracker] [bug #49852] Incorrect plot with trisurf + axis equal
Date: Thu, 15 Dec 2016 15:09:04 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?49852>

                 Summary: Incorrect plot with trisurf + axis equal
                 Project: GNU Octave
            Submitted by: billgreene
            Submitted on: Thu 15 Dec 2016 03:09:03 PM GMT
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

I tried to execute the code sample below with the 64-bit
version of octave on windows. Without the "axis equal" line
the plot looks fine. With that line, the plot shows many
fine parallel lines on my screen. The plot is correct with
the 32-bit version of octave 4.0.

function trisurf_mesh
m=11; n=11; % includes boundary nodes, mesh spacing 1/(m-1) and 1/(n-1)
[x,y]=ndgrid((0:m-1)/(m-1),(0:n-1)/(n-1)); % matlab forms x and y lists
p=[x(:),y(:)]; % N by 2 matrix listing x,y coordinates of all N=mn nodes
t=[1,2,m+2; 1,m+2,m+1]; % 3 node numbers for two triangles in first square
t=kron(t,ones(m-1,1))+kron(ones(size(t)),(0:m-2)');
% now t lists 3 node numbers of 2(m-1) triangles in the first mesh row
t=kron(t,ones(n-1,1))+kron(ones(size(t)),(0:n-2)'*m);
U=sin(pi*x).*sin(pi*y);
figure;
trisurf(t,p(:,1),p(:,2),0*p(:,1),U(:),'edgecolor','k','facecolor','interp');
axis equal
end




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49852>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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