bugGNU Octave - Bugs: bug #52186, Adding an annotation also adds a...


bug #52186: Adding an annotation also adds a black border around figure

Submitted by:  Etienne Dechamps <edechamps>
Submitted on:  Sat 07 Oct 2017 09:05:18 PM UTC  
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  4.2.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.


Sun 15 Oct 2017 12:39:10 AM UTC, comment #5:

I verified the fix for bug #52170 resolves this bug as well. Fixed on the development branch.

Rik <rik5>
Project Administrator
Sat 14 Oct 2017 11:22:47 PM UTC, comment #4:

I've added a patch to bug report 52170


that addresses this scenario as well as the case of placing multiple axes on the same plot. The issue is that arrows, just like labels, are persistent in gnuplot so need to be cleared between plots and multiplots.

Dan Sebald <sebald>
Sat 14 Oct 2017 10:24:33 PM UTC, comment #3:

Confirmed with a recent development tip (10/14/17). Adding Dan to the CC list for this bug. This is probably a consequence of the fact that the annotation object is implemented in a new axes object.

Rik <rik5>
Project Administrator
Sun 08 Oct 2017 12:24:53 PM UTC, comment #2:

Intriguingly, the 'xcolor' and 'ycolor' properties of the axes object have an effect on the color of the spurious border:

These will change the color of the axes and the spurious border around the figure at the same time. Seems like there is something wrong with the gnuplot axes properties that Octave generates.

One workaround could be to set these colors to white, but of course that's not practical, because then the actual axes themselves become white.

A more intricate workaround is to create a new dummy axes object that we can set to white:

This seems to be effective at removing the spurious border.

Etienne Dechamps <edechamps>
Sun 08 Oct 2017 09:44:31 AM UTC, comment #1:

After dumping the gnuplot script using the debug version of drawnow() and experimenting with it, I noticed that the following gnuplot commands are generated if an annotation is present:

Commenting out these lines makes the border disappear. Seems like Octave should not be generating these commands.

Etienne Dechamps <edechamps>
Sat 07 Oct 2017 09:05:18 PM UTC, original submission:

On Debian Sid, octave 4.2.1-4+b1, gnuplot 5.0.7+dfsg1-1:

As soon as the third command (annotation) is entered, in addition to the annotation itself, a 1-pixel black border suddenly appears around the entire figure for no apparent reason. The border appears when outputting to a window and when print()'ing to an image file.

This only occurs when using the gnuplot toolkit.

Etienne Dechamps <edechamps>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sebald (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by edechamps (Submitted the item)

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

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-15 rik5 StatusNone => Fixed
        Open/ClosedOpen => Closed
    2017-10-14 rik5 Carbon-Copy- => Added sebald

    Back to the top

    Powered by Savane 3.3