bugGNU Octave - Bugs: bug #53955, In Matlab first argument to axes...

 
 

bug #53955: In Matlab first argument to axes function can be a container for the axes, e.g. a figure handle

Submitter:  Richard <crobar>
Submitted:  Mon 21 May 2018 12:24:29 PM UTC
   
 
Category:  Octave Function Severity:  2 - Minor
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Richard Crozier Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 16 Nov 2018 05:57:58 AM UTC, comment #2: 

I added this feature to Octave in this cset https://hg.savannah.gnu.org/hgweb/octave/rev/9a58d7e0554e.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Wed 23 May 2018 07:02:25 PM UTC, comment #1: 

I wonder how new this feature is?

In any case, the axes function is implemented in the m-file scripts/plot/util/axes.m.  It shouldn't be that difficult to modify the input checking to handle this case if you are interested in giving it a go.

There is also the easy work around of supplying the "parent" property.  This code will work in both Octave and Matlab


hfig = figure;
hax = axes ('parent', hfig);


I'm lowering the priority since there is a simple workaround.

Rik <rik5>
Group administrator
Mon 21 May 2018 12:24:29 PM UTC, original submission:  

In Matlab first argument to axes function can be a container for the axes, e.g. a figure handle, so that the axes is created in that figure (rather than the current figure).

In octave this syntax result in an error. Example:

in Matlab r2018a:


>> hfig = figure;
>> hax = axes (hfig)

hax =

  Axes with properties:

             XLim: [0.0000e+000 1.0000e+000]
             YLim: [0.0000e+000 1.0000e+000]
           XScale: 'linear'
           YScale: 'linear'
    GridLineStyle: '-'
         Position: [130.0000e-003 110.0000e-003 775.0000e-003 815.0000e-003]
            Units: 'normalized'

  Show all properties


in Octave:


>> hfig = figure;
>> hax = axes (hfig)
error: axes: H must be a scalar axes handle
error: called from
    axes at line 90 column 7
stopped in /usr/local/share/octave/4.4.0/m/plot/util/axes.m at line 90
90:       error ("axes: H must be a scalar axes handle");


Richard <crobar>

 

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

Attach Files:
   
   
Comment:
   

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 crobar (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-16 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2018-05-23 rik5 CategoryNone Octave Function
        Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNone Confirmed
        Release4.4.0 dev

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code