bugGNU Octave - Bugs: bug #44577, In case that 'MarkerFaceColor'...

 
 

bug #44577: In case that 'MarkerFaceColor' property is used, "print" command cannot generate a correct image file.

Submitter:  Daisuke TAKAGO <takago>
Submitted:  Thu 19 Mar 2015 06:49:29 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  4 - Important
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Daisuke TAKAGO Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 20 Oct 2015 04:49:27 PM UTC, comment #12: 

gl2ps 1.3.9 has been released and fixes this bug.

Closing report.

Pantxo Diribarne <pantxo>
Group Member
Sat 17 Oct 2015 05:17:38 PM UTC, comment #11: 

No schedule but there will probably be a release soon.

Pantxo Diribarne <pantxo>
Group Member
Thu 03 Sep 2015 08:48:01 PM UTC, comment #10: 

@Rik: I posted your question on gl2ps mailing list.

Pantxo Diribarne <pantxo>
Group Member
Thu 03 Sep 2015 06:15:23 PM UTC, comment #9: 

Great, it's an upstream bug and not Octave.  Is there any schedule for the next gl2ps release?  Do we want to document somewhere that Octave works best with version gl2ps-XX.YY?

Rik <rik5>
Group administrator
Thu 03 Sep 2015 05:57:27 PM UTC, comment #8: 

I attached the eps/pdf files I obtain from comment #6 and comment #7 examples, when using the current dev version of gl2ps.

Both are correct so it is probably also related to the issue with polygon_offset in the current stable gl2ps.

(file #34806, file #34807)

Pantxo Diribarne <pantxo>
Group Member
Wed 02 Sep 2015 03:01:23 PM UTC, comment #7: 

Something very screwy is going on with gl2ps.

Try this example


x = linspace(0,1,10);
[X,Y] = meshgrid(x);
mesh (X,Y,X+Y+1)
hold on
plot3 (-1,-1,-1, 'o', 'Markerfacecolor', 'b')
print test1.pdf


In this case, neither the mesh plot nor the 3-D point are at the Z=0 plane.  And the two objects don't overlap in any way, and yet you can only see a vague tracery of the mesh grid.

It is possible to get the right plot by reversing the object stack in Octave so that the mesh is plotted "on top" of the line object.  This shouldn't be necessary, because they aren't actually on top of each other, but it is another workaround.  Maybe there is problem with the sorting options that Octave is passing to gl2ps in this case, or there is an error in the sorting algorithm within gl2ps.


hk = get (gca, 'children')
hidden on
set (gca, 'children', flipud (hk))
print test2.pdf




(file #34794, file #34795)

Rik <rik5>
Group administrator
Wed 02 Sep 2015 09:53:35 AM UTC, comment #6: 

Hi,

just to say that the workaround still leaves some problems with 3d plots:


x = linspace(0,1,10);
[X,Y] = meshgrid(x);
mesh(X,Y,X+Y)
hold on
plot3(0,0,0,'o','MarkerFaceColor','b')
set(gca,"color","none")
print -depsc out1.eps


The surface is white.

Marco Caliari <caliari>
Group Member
Sat 21 Mar 2015 12:15:20 AM UTC, comment #5: 

I was just writing something similar :-). I provided a patch that is now in gl2ps dev tree and that fixes the issue here.

Until the next release of gl2ps, we have at least a workaround: "set (gca, "color", "none")".

Pantxo Diribarne <pantxo>
Group Member
Sat 21 Mar 2015 12:05:47 AM UTC, comment #4: 

This is almost certainly because of gl2ps and its mishandling of polygon_offsets as suggested by Pantxo in comment #2.

The issue is that the axis object itself can have a background color and that this is implemented by a patch object.  The line objects at z=0 are getting forced underneath this patch object which is colored white.  If you make the axis transparent then I get the desired plot


plot(1:20,'o-','MarkerSize',10,'MarkerFaceColor','b','Color','r');grid on
set (gca, "color", "none")
print -dpng out1.png;print -depsc2 out1.eps;



Rik <rik5>
Group administrator
Thu 19 Mar 2015 11:07:54 AM UTC, comment #3: 

This is a regression, it used to work in Octave 3.8.1. Marking this bug's severity as "Important" because it's a frequently met use case of plots.

Pantxo Diribarne <pantxo>
Group Member
Thu 19 Mar 2015 08:02:27 AM UTC, comment #2: 

Hi,

Thanks for your bug report. I can confirm the bug on both fltk an qt graphics toolkits.
As you can see on out1.png, the last marker on the right hand side is not clipped in the axes area and the red edge is displayed on the outer part of the marker. All lines are actually hidden behind the background plane of the axes.

This is most probably due to gl2ps not handling correctly multiple polygon_offsets in a single figure. See bug #44111 for an explanation. I'll try to see if something can be done in Octave to workaround this.

Pantxo Diribarne <pantxo>
Group Member
Thu 19 Mar 2015 06:55:27 AM UTC, comment #1: 

Sorry, I was wrong the example code. Please replace 'o' with 'o-' ,as follows.


% Example1 (this code generates desired images)
plot(1:20,'o-','MarkerSize',10,'MarkerFaceColor','none','Color','r');grid on;print -dpng out0.png;print -depsc2 out0.eps;

% Example2 (this code generates images which have no plot- and grid-lines. However, markers and grid-labels are shown.)
plot(1:20,'o-','MarkerSize',10,'MarkerFaceColor','b','Color','r');grid on;print -dpng out1.png;print -depsc2 out1.eps;

Daisuke TAKAGO <takago>
Thu 19 Mar 2015 06:49:29 AM UTC, original submission:  

I found a bug about print.m.

print.m can generate a image file, but the generated image have no plot/grid-lines.


% Example1 (this code generates desired images)
plot(1:20,'o','MarkerSize',10,'MarkerFaceColor','none','Color','r');grid on;print -dpng out0.png;print -depsc2 out0.eps;


% Example2 (this code generates images which have no plot- and grid-lines. However, markers and grid-labels are shown.)
plot(1:20,'o','MarkerSize',10,'MarkerFaceColor','b','Color','r');grid on;print -dpng out1.png;print -depsc2 out1.eps;

Daisuke TAKAGO <takago>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #34806:  test1.pdf added by pantxo (7KiB - application/pdf)
file #34807:  out1.eps added by pantxo (31KiB - image/x-eps)
file #34794:  test1.pdf added by rik5 (7KiB - application/pdf)
file #34795:  test2.pdf added by rik5 (7KiB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-10-20 pantxo Open/ClosedOpen Closed
    2015-10-20 pantxo StatusConfirmed Fixed
    2015-09-03 pantxo Attached File- Added test1.pdf, #34806
        Attached File- Added out1.eps, #34807
    2015-09-02 rik5 Attached File- Added test1.pdf, #34794
        Attached File- Added test2.pdf, #34795
    2015-03-19 pantxo StatusNone Confirmed
    2015-03-19 pantxo Severity3 - Normal 4 - Important
        Item GroupIncorrect Result Regression

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code