bugGNU Octave - Bugs: bug #49852, Incorrect plot with trisurf + axis...

 
 

bug #49852: Incorrect plot with trisurf + axis equal

Submitter:  Bill Greene <billgreene>
Submitted:  Thu 15 Dec 2016 03:09:03 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 11 Jan 2017 06:32:28 PM UTC, comment #3: 

This is a duplicate of bug #49755 where I posted a fix.
Please, feel free to post there or re-open this bug report if there is something that is not covered in the other one.

Markus Mützel <mmuetzel>
Group administrator
Wed 21 Dec 2016 10:45:05 AM UTC, comment #2: 

Hello,
I agree with the two messages and the same problem also occurs on Linux.
Using 'axis equal' for a 3D view with an empty range gives no output, while it worked for Octave 4.0.3 or 4.0.0. For example,

plot3([0 1],[0 1],[1 1])
axis equal

Gilles Scarella <gscarella>
Thu 15 Dec 2016 05:45:18 PM UTC, comment #1: 

I see the same here, 4.2.0, zip, 64bit.
Not specifically mentioned, but the
Bill does not specifically mention it, but he made the z-axis to span a zero range ( 0*p(:,1) )
Any dimension in the z-range and the plot is OK.

kire pudsje <kpc>
Thu 15 Dec 2016 03:09:03 PM UTC, original submission:  

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

Bill Greene <billgreene>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by gscarella (Posted a comment)
  • -email is unavailable- added by kpc (Posted a comment)
  • -email is unavailable- added by billgreene (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-11 mmuetzel StatusNone Duplicate
        Open/ClosedOpen Closed
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code