bugGNU Octave - Bugs: bug #48842, grid overwrites axis box when both...

 
 

bug #48842: grid overwrites axis box when both are displayed

Submitted by:  Rik <rik5>
Submitted on:  Sun 21 Aug 2016 02:54:08 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

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)

Fri 26 Aug 2016 06:02:12 PM UTC, comment #13:

Lowering the expected file size fixed the issue to me.

Carnë Draug <carandraug>
Project Member
Thu 25 Aug 2016 03:51:24 PM UTC, comment #12:

I changed the fingerprint in the test (http://hg.savannah.gnu.org/hgweb/octave/rev/85fa7238dafc). See if it works for you now.

Rik <rik5>
Project Administrator
Thu 25 Aug 2016 03:22:01 PM UTC, comment #11:

According to doug on IRC, the cset 8f23b5b23235 is causing one of the tests to fail. Me and jwe are also seeing this test failing.

I guess that since the figure has changed, the filesize has changed as well. But is the expected file size that should be changed? I guess the test was not failing for you so maybe it should be the precision on the file size?

Carnë Draug <carandraug>
Project Member
Mon 22 Aug 2016 08:39:14 PM UTC, comment #10:

@Pantxo: I pushed your cest for grid/axes overlap here (http://hg.savannah.gnu.org/hgweb/octave/rev/8f23b5b23235). I will push another one to fix the fact that all lines that are part of the axes do not respect the linewidth property of the axes object.

Rik <rik5>
Project Administrator
Mon 22 Aug 2016 05:35:34 PM UTC, comment #9:

Another comment, when zooming in on the pdf, I can see that the axes box is drawn with a linewidth of 0.5 (as is specified in the axes), but the grid is drawn with a linewidth of 1.0. It is "showing" through because of that.

Should the grid linewidth be the same as other lines set in the axes? I'll ask on the Maintainer's List.

Rik <rik5>
Project Administrator
Mon 22 Aug 2016 05:30:53 PM UTC, comment #8:

The second patch works for me with both FLTK and Qt toolkits. I'm tempted to push it, but are we concerned with the anti-aliasing effects during printing? I'm attaching the file that results when I print to pdf.

(file #38316)

Rik <rik5>
Project Administrator
Mon 22 Aug 2016 11:43:04 AM UTC, comment #7:

I don't see a difference between fltk and qt on my system but anyway following the logic of the previous cset I should have drawn the planes first. I attached an updated cset, but this way of ordering primitives doesn't seem robust.

(file #38312)

Pantxo Diribarne <pantxo>
Project Member
Mon 22 Aug 2016 12:51:24 AM UTC, comment #6:

@Pantxo's patch works for me with the Qt toolkit. With the FLTK toolkit, no grid is displayed. It seems to still be behind the axes planes.

This is annoying, but maybe the draw_axes_plane routine needs to be broken up. It can use a GL_PATH or GL_QUADS to produce the colored background. And then a separate function which uses GL_LINES or GL_LINE_LOOP to draw the outline part of the axes. The outline part could be called after the grid has been drawn.

This would probably also be helpful for supporting the 'origin' specification for xaxislocation and yaxislocation.

Rik <rik5>
Project Administrator
Sun 21 Aug 2016 08:55:23 PM UTC, comment #5:

@Dan: the artifact you see is antialiasing (that was applied by ghostscript when converting eps to raster image) which leads to blending/blurring two overlapping lines.

I played with simply inverting the order in which we draw axes parts (see also bug #46073): in the attached cset I draw the grid, the tick marks and then only the axes box. The on-screen result is as expected. The png printout is also affected by antialiasing issues but at least the blue is over the red.

Ideally we should avoid overlapping lines but it is not straightforward as explained by Rik in bug #46073.

(file #38308)

Pantxo Diribarne <pantxo>
Project Member
Sun 21 Aug 2016 05:22:15 PM UTC, comment #4:

Oh, you used "print -dpng myfile.png". Yes, I'm getting the same result that way. It looks to me that OSMesa doesn't have alpha blending. We know there is something odd with line order as well--wasn't there a bug in which two overlying octagon patches or decagon patches had the border of the further behind patch out in front?

Dan Sebald <sebald>
Sun 21 Aug 2016 05:19:33 PM UTC, comment #3:

Rik,

On your octave plot, the axis color is different
shade of red than the grid.
So may be the issue is with transparency level.
Perhaps a different color combinations could make it more
pronounced.

(On all my computers the plots look exactly like Dan's).

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 21 Aug 2016 04:50:54 PM UTC, comment #2:

Hmmm. Might be different OpenGL versions, Mesa versions, etc. That doesn't sound fun o debug.

Rik <rik5>
Project Administrator
Sun 21 Aug 2016 03:41:31 PM UTC, comment #1:

Attached is the plot generated on my system for the Qt toolkit. It looks close to Matlab result. However, exact-match purists would say defaulting to 0 left-x-range and consequently spacing by 2 rather than 1 is a bug.

(file #38302)

Dan Sebald <sebald>
Sun 21 Aug 2016 02:54:08 PM UTC, original submission:

If the grid is on and the box is displayed, then the grid "wins" and is displayed instead of the box. Matlab does it correctly and displays the box/axes color.

Sample script:

Attached are an image from Octave and one from Matlab.

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #38316:  blended_axes_grid.pdf added by rik5 (3KiB - application/pdf)
file #38312:  axes_order2.patch added by pantxo (1KiB - text/x-diff)
file #38308:  axes_order.patch added by pantxo (1KiB - text/x-diff)
file #38300:  octave.png added by rik5 (20KiB - image/png)
file #38301:  matlab.png added by rik5 (9KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by dasergatskov (Posted a comment)
  • -unavailable- added by sebald (Updated the item)
  • -unavailable- added by rik5 (Submitted the item)
  •  

    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 14 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 26 Aug 2016 06:02:12 PM UTCcarandraugStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 25 Aug 2016 03:51:24 PM UTCrik5StatusIn Progress=>Ready For Test
    Thu 25 Aug 2016 03:22:01 PM UTCcarandraugStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Mon 22 Aug 2016 08:39:14 PM UTCrik5StatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Mon 22 Aug 2016 05:30:53 PM UTCrik5Attached File-=>Added blended_axes_grid.pdf, #38316
      StatusConfirmed=>In Progress
    Mon 22 Aug 2016 11:43:04 AM UTCpantxoAttached File-=>Added axes_order2.patch, #38312
    Sun 21 Aug 2016 08:55:23 PM UTCpantxoAttached File-=>Added axes_order.patch, #38308
    Sun 21 Aug 2016 03:41:31 PM UTCsebaldAttached File-=>Added djs-Screenshot from 2016-08-21 10:37:08.png, #38302
    Sun 21 Aug 2016 02:54:08 PM UTCrik5Attached File-=>Added octave.png, #38300
      Attached File-=>Added matlab.png, #38301

    Back to the top


    Powered by Savane 3.1-cleanup1