bugGNU Octave - Bugs: bug #45881, Diagonal lines visible in PNG...

 
 

bug #45881: Diagonal lines visible in PNG image created using pcolor

Submitted by:  None
Submitted on:  Sat 05 Sep 2015 04:58:33 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: FixedAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.1
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 14 Nov 2016 02:40:06 PM UTC, comment #6:

The default ghostscript options for exporting raster figure using print is now to disable antialiasing on graphics (the equivalent of the solution in comment #3).

Closing report.

Pantxo Diribarne <pantxo>
Project Member
Wed 09 Sep 2015 07:09:05 AM UTC, comment #5:

I think this issue is not related any OpenGL, but Ghostscript related, since going through gnuplot makes the same result, but rectangles instead of triangles. The problem is that Ghostscript is anti-aliasing on each polygon, instead of the entire output image. This results in ugly artificial boundary conditions.

Even though this particular bug belongs to Ghostscript, Octave still needs internal print functionality to properly images with different shadings (or, is it possible to use smooth shading in postscript?)

Anonymous
Sun 06 Sep 2015 09:36:02 AM UTC, comment #4:

If you only want a rasterized version of the image, I must agree that using the current export functionality, which is based on vecorized intermediate results, is not ideal.

Direct rendering is possible with the internal function _osmesa_print_ (in Octave >= 4.0.0), which basically makes a “screenshot” of the OpenGL scene. Note that the image must be invisible for that purpose and the function is known to crash on NVIDIA chipsets.

The interval package contains a simple wrapper function _print_mesa_ that you could use. It adds anti-aliasing to the image and respects the figure's papersize for export. I use it instead of “print” to export raster graphics for the interval package's manual, because the described problem gets even worse in 3D rendering, see bug #45137.

Oliver Heimlich <oheim>
Sun 06 Sep 2015 09:03:05 AM UTC, comment #3:

This is a ghostscript wrapper that solves the problem

It basically turns of anti-aliasing for graphics but it is a hack. It should also be added that the gnuplot backend is also affected.

This bug is similar to the infamous `sound` bug. The bug here is that ghostscript cannot be used to rasterize the vector graphics. With the MESA support in 4.0, it is perhaps possible to render to a file directly, without an external program.

Anonymous
Sun 06 Sep 2015 07:20:12 AM UTC, comment #2:

It is sort of a duplicate of #44181, and for vector graphics, the bug is present in Matlab as well. But I export to raster graphics, and we do not need to use gs as external rasterizer.

Anonymous
Sat 05 Sep 2015 06:02:22 PM UTC, comment #1:

This is a duplicate of bug #44181.

Oliver Heimlich <oheim>
Sat 05 Sep 2015 04:58:33 PM UTC, original submission:

Actually, you do not need to set colormap, but it makes the issue more visible.

Since I need to get rid of them quickly I also ask for a different solution. I use pcolor since I want logarithmic x- and y-axis. I can apply a median filter afterwards, but that requires horrible amount of RAM since my grid is fine-grained. Since it appears that Octave does it through gs,

gives me 9.10

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34816:  test.png added by None (332KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by oheim (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 14 Nov 2016 02:40:06 PM UTCpantxoStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 05 Sep 2015 04:58:33 PM UTCNoneAttached File-=>Added test.png, #34816

    Back to the top


    Powered by Savane 3.1-cleanup1