bugGNU Octave - Bugs: bug #53343, "Number" property for...


bug #53343: "Number" property for figure

Submitted by:  Guillaume <gyom>
Submitted on:  Wed 14 Mar 2018 11:07:08 AM UTC  
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

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


Tue 17 Apr 2018 07:50:34 PM UTC, comment #3: 

I added a Number property to Octave in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/ac6ba9f2fa41).

It may not be perfect, but it does respect "IntegerHandle" and return [] in that case, or the figure number in the ordinary case.

Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Mon 19 Mar 2018 05:47:54 PM UTC, comment #2: 

Thanks for the feedback.

One thing to add (related to bug #53342) is that the value of this property can change according to another property "IntegerHandle". See Matlab code below:

>> h = figure;
>> get (h, 'Number')
ans =
>> set (h, 'IntegerHandle', 'off');
>> get (h, 'Number')
ans =
>> figure;
>> set (h, 'IntegerHandle', 'on');
>> get (h, 'Number')
ans =

Guillaume <gyom>
Mon 19 Mar 2018 04:39:11 PM UTC, comment #1: 

Confirmed.  You can note that there is this bit of code in graphics.in.h

      // FIXME: Need RO property which returns current figure number.
      // double_property number r ,

so this is a known issue.

It shouldn't be that hard to implement.  Currently, the value of the handle is equal to this "Number" property.  It should be easy to copy the value of the handle over to this read-only property just once when the figure is constructed.

Rik <rik5>
Project Administrator
Wed 14 Mar 2018 11:07:08 AM UTC, original submission:  

Matlab's figures have a read-only "Number" property containing the figure number:


Guillaume <gyom>


(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 rik5 (Posted a comment)
  • -email is unavailable- added by gyom (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
    2018-04-17 rik5 StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2018-03-19 rik5 StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.5