bugGNU Octave - Bugs: bug #53647, Order of plot commands xlabel,...


bug #53647: Order of plot commands xlabel, hold & plot fcts

Submitted by:  Charles Praplan <charprap>
Submitted on:  Sat 14 Apr 2018 07:23:13 AM UTC  
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Charles Praplan Open/Closed:  Closed
Release:  4.2.2 Operating System:  Microsoft Windows

Add a New Comment(Rich Markup)

You are not logged in

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


Thu 25 Oct 2018 02:49:39 PM UTC, comment #3:

This is a duplicate of bug #48718 which has been fixed.

Closing report as fixed

Pantxo Diribarne <pantxo>
Project Member
Sat 14 Apr 2018 01:09:14 PM UTC, comment #2:

For someone who comes along later and is debugging this, the problem is the axes object position property which is not set correctly.


will restore a normal-looking plot.

Rik <rik5>
Project Administrator
Sat 14 Apr 2018 01:07:46 PM UTC, comment #1:

Yes it does. Best practice for Octave is to first plot your data, and then annotate the graph with labels, titles, etc. If you reverse the order of the code it works just fine.

As an added bonus, there is no need to use the 'hold on' command since xlabel will not clear the figure window. So the shorter, working code is

Marking this as confirmed since it is reproducible, but lowering the priority since there is a simple workaround.

Rik <rik5>
Project Administrator
Sat 14 Apr 2018 07:23:13 AM UTC, original submission:

Following code produces a buggy figure!

xlabel('Time [s]');
hold on;
plot([1:1000]/fs, [1:1000].^2);

Remarks :

- this happens with 'qt' and 'fltk' graphics_toolkit
- ok with fs=1e5
- ok without "xlabel('Time [s]');"
- ok without "hold on"

Charles Praplan <charprap>


(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 pantxo (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by charprap (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-25 pantxo StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2018-04-14 rik5 CategoryPlotting => Plotting with OpenGL
        Priority5 - Normal => 3 - Low
        Item GroupNone => Incorrect Result
        StatusNone => Confirmed
        Summaryxlabel, hold & plot fcts => Order of plot commands xlabel, hold & plot fcts

    Back to the top

    Powered by Savane 3.4