bugGNU Octave - Bugs: bug #54793, Dashed line becomes solid in legend

 
 

bug #54793: Dashed line becomes solid in legend

Submitter:  Tunc <tunc>
Submitted:  Fri 05 Oct 2018 07:30:31 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  2 - Minor
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  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

Mon 18 Nov 2019 10:18:47 PM UTC, comment #11: 

I'm not sure if it is the new legend.m code for version 6.1, but this bug has been fixed on the development branch.  Closing report.

Rik <rik5>
Group administrator
Thu 22 Nov 2018 06:36:01 PM UTC, comment #10: 

Is there a way to definitively determine whether the fault lies with Octave or with gl2ps.

It would seem to be gl2ps since the same OpenGL buffer can be sent to svg (which works) versus ps (which doesn't) and both pass through gl2ps.

Could we use the debugging form of drawnow to see more of what the raw output is?

If it is an upstream bug then we should report it and close this Octave report.

Rik <rik5>
Group administrator
Wed 21 Nov 2018 01:45:12 AM UTC, comment #9: 

Lowering the severity of the bug and the priority since there are several workarounds.

Rik <rik5>
Group administrator
Mon 12 Nov 2018 06:00:39 PM UTC, comment #8: 

I have attached a script tst_painters.m which reproduces this bug on the development branch.  The resulting bug.eps is also attached.

I still think we need to do some root-cause debugging.  The legend is in its own axes object within Octave.  I'm not sure that Octave isn't screwing things versus gl2ps.


(file #45413, file #45414)

Rik <rik5>
Group administrator
Mon 12 Nov 2018 12:34:14 AM UTC, comment #7: 

@Rik: We now use getframe by default (-opengl renderer) for PNG outputs, which is WYSIWYG. Using "print -painters foo.png" or "print foo.eps" I still can reproduce the original issue.

Pantxo Diribarne <pantxo>
Group Member
Sun 11 Nov 2018 11:27:34 PM UTC, comment #6: 

This seems to have been fixed already on the development branch of Octave.  Even without using the new -svgconvert option, the output is correct.  I think it would be tedious to find exactly which changeset fixed the problem and backport it to the stable branch.  Nor do I think there is going to be a 4.4.2 bug fix release.  Instead, a new version 5.0 should be released at the end of this year.  I'm going to mark this as fixed and close report.

Rik <rik5>
Group administrator
Sun 07 Oct 2018 09:23:41 AM UTC, comment #5: 

@Tunc: There is an ongoing effort to provide an alternative way of exporting figures, through the conversion from svg file (instead of eps as is currently the case for png output), and I hope the patch from bug #52193 can make it into Octave 5.

@Mike: Would you have some time to devote to bug #52193 and give me advices or pointers on how to integrate the svg converter utility into Octave's build system?

Pantxo Diribarne <pantxo>
Group Member
Sat 06 Oct 2018 10:34:54 PM UTC, comment #4: 

I confirm that both exporting a .svg file and changing the colour of the legend box while keeping it on work for me as well.

Tunc <tunc>
Sat 06 Oct 2018 09:59:57 PM UTC, comment #3: 

Exporting the figure to svg format works fro me, which makes me think it is a bug in gl2ps.

Pantxo Diribarne <pantxo>
Group Member
Fri 05 Oct 2018 08:29:48 PM UTC, comment #2: 

Another workaround that works for me, change the color of the bounding box instead of turning it off:


legend boxon;
hleg = legend;
set (hleg, "edgecolor", "white");


Mike Miller <mtmiller>
Group Member
Fri 05 Oct 2018 08:26:36 PM UTC, comment #1: 

Confirmed here with 4.4.1 and the latest development version, using the default qt toolkit. And confirmed that 'boxon' restores the legend border and prints the line correctly as dashed. Switching to the gnuplot toolkit is a possible workaround to get this working.

Mike Miller <mtmiller>
Group Member
Fri 05 Oct 2018 07:30:31 PM UTC, original submission:  

The below code produces a correct figure as viewed in the figure window. However, the rendered bug.png figure (attached) produces a solid line in the legend, although the data is still shown as a dashed line. The same situation is also the case if the exported file is .jpg.

I figured out that this problem happens because of the presence of the third line, "legend boxoff".


plot(1:10, 1:10, 'r:', 'linewidth', 3);
legend('a');
legend boxoff;
print('bug.png');


I am not very knowledgeable on the source code of Octave. Any input as to how to fix this would be appreciated.

Tunc <tunc>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45413:  tst_painters.m added by rik5 (86B - text/x-objcsrc)
file #45414:  bug.eps added by rik5 (7KiB - image/x-eps)
file #45154:  bug.png added by tunc (15KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-18 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2018-11-21 rik5 Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
    2018-11-12 rik5 Attached File- Added tst_painters.m, #45413
        Attached File- Added bug.eps, #45414
        Release4.4.1 dev
    2018-11-12 pantxo StatusFixed Confirmed
        Open/ClosedClosed Open
    2018-11-11 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2018-10-08 johasixt Carbon-Copy- Added johasixt
    2018-10-05 mtmiller CategoryPlotting Plotting with OpenGL
        StatusNone Confirmed
        Release4.2.2 4.4.1
    2018-10-05 tunc Attached File- Added bug.png, #45154

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code