bugGNU Octave - Bugs: bug #31450, figure filename property not...

 
 

bug #31450: figure filename property not settable (MATLAB incompatibility)

Submitter:  Kevin Davies <daviesk24>
Submitted:  Mon 25 Oct 2010 02:25:26 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  1 - Later Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Kevin Davies Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 13 Nov 2010 06:29:24 AM UTC, comment #5: 

I checked in the following change so that this property is writable.

http://hg.savannah.gnu.org/hgweb/octave/rev/29b1f7d68665

The property is still not used anywhere in Octave that I know of, but at least now code that expects to be able to write to it won't fail.

Obviously this does not implement saving figures in the fig file format, but I think it addresses the problem of setting the filename property so I'm closing this bug report.

John W. Eaton <jwe>
Group administrator
Tue 26 Oct 2010 02:31:43 AM UTC, comment #4: 

To see what ML does, I created a simple figure. Saved it as a Matlab fig-file (untitled.fig). Changed its name to untitled.mat. And loaded the file. The contents look straight forward. I'm not currently planning to work on this, but if someone does they should also think about implementing copyobj().

p = load untitled.mat
p =

    hgS_070000: [1x1 struct]

>> p.hgS_070000


ans =

          type: 'figure'
        handle: 5
    properties: [1x1 struct]
      children: [1x1 struct]
       special: []

>> p.hgS_070000.properties


ans =

               Color: [0.8 0.8 0.8]
            Colormap: [64x3 double]
      InvertHardcopy: 'on'
    PaperOrientation: 'landscape'
       PaperPosition: [0.25 0.25 10.5 8]
           PaperSize: [11 8.5]
            Position: [560 508 560 420]
     ApplicationData: [1x1 struct]

>> p.hgS_070000.properties.ApplicationData


ans =

    FileMenuFcnLastExportedAsType: 4

>> p.hgS_070000.children


ans =

          type: 'axes'
        handle: 967.01
    properties: [1x1 struct]
      children: [5x1 struct]
       special: [4x1 double]


Ben Abbott <bpabbott>
Group Member
Mon 25 Oct 2010 05:45:32 PM UTC, comment #3: 

Plus, we have no equivalent of the Matlab fig file format that I know of.

John W. Eaton <jwe>
Group administrator
Mon 25 Oct 2010 04:35:52 PM UTC, comment #2: 

Ben,
I understand.  I'll try to find another way to do what I want.  Thanks a lot.
Kevin

Kevin Davies <daviesk24>
Mon 25 Oct 2010 02:40:09 PM UTC, comment #1: 

For those who drop by the filename property is described by Mathwords as ...

GUI FIG-file name. GUIDE stores the name of the FIG-file used to save the GUI layout in this property. In non-GUIDE GUIs, by default FileName is empty. You can set the FileName property in non-GUIDE GUIs as well, and get it to verify what GUI is running or whether it has been previously saved.

Kevin, Octave has a way to go before it is fully compliant with respect to the GUI features available with Matlab.


Ben Abbott <bpabbott>
Group Member
Mon 25 Oct 2010 02:25:26 PM UTC, original submission:  

I am new to Octave, so maybe there's an obvious answer to this question.  However, it seems to indicate an incompatibility with MATLAB.  Here are the details:

It doesn't seem that the "filename" property of a figure is settable.  If I enter "figure; get(gcf, 'filename')", I get ans = ''.  If I then enter "set(gcf, 'filename', 'test')" I get an error: "set: unknown property "filename"".  Is there a way to set this property?  I'd like to use it to keep track of my figures as I save them.

Thanks.

Kevin Davies <daviesk24>

 

(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 (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by daviesk24 (Submitted the item)
  • -email is unavailable- added by daviesk24
  •  

    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
    2010-11-13 jwe StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2010-11-03 rik5 Priority5 - Normal 1 - Later
    2010-10-25 bpabbott Item GroupNone Feature Request
        StatusNone Confirmed
        Release3.2.3 dev
    2010-10-25 daviesk24 Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code