bugGNU Octave - Bugs: bug #53373, Inaccurate printout of grids in 3D...

 
 

bug #53373: Inaccurate printout of grids in 3D view

Submitter:  Hans Wilke <hansw>
Submitted:  Sun 18 Mar 2018 08:39:00 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Mar 2018 07:47:20 AM UTC, comment #1: 

I can confirm, except that plot3 doesn't give perfect results either. The bug is also present in default (upcoming Octave 4.4).

It turns out there are two issues:

  • the Y axis looking thinner is due the back plane being drawn above the line (incorrect depth sorting in gl2ps). You can workaround this using the following:



set (gcf, "inverhardcopy", "off")
set (gca, "color", "none")
...


  • the ugly dashed grid lines look like another manifestation of bug #53229. gl2ps randomly splits lines (for depth sorting I guess) and the dash pattern is restarted for each line segment.
Pantxo Diribarne <pantxo>
Group Member
Sun 18 Mar 2018 08:39:00 AM UTC, original submission:  

If I plot and print a 3D graph with mesh, surf (...) the y-axis and grids behave unexpected. The Y-axis is thinner than any other axis or grid. Setting a linewidth lets it scale with the other lines, but it stays thinner. The grids in the background show a random behavior.

Plotting the same data with plot3 though produces axis and grids just as expected. The Code below demonstrates this.

[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
plot3(X,Y,Z)
grid on
set(gca(), "gridcolor", [0 0 0])
set(gca(), "gridlinestyle", "--")
print('-dtex',"-S200,150",'plot3');

mesh(X,Y,Z)
grid on
set(gca(), "gridcolor", [0 0 0])
set(gca(), "gridlinestyle", "--")
print('-dtex',"-S200,150",'mesh');

Hans Wilke <hansw>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #43585:  mesh-inc.eps added by hansw (700KiB - application/postscript)
file #43586:  plot3-inc.eps added by hansw (102KiB - application/postscript)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by hansw (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-19 pantxo CategoryPlotting Plotting with OpenGL
        StatusNone Confirmed
        Release4.2.1 dev
        SummaryMesh grids and axis and grids behave unexpected Inaccurate printout of grids in 3D view
    2018-03-18 hansw Attached File- Added mesh-inc.eps, #43585
        Attached File- Added plot3-inc.eps, #43586

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code