help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving And Loading Plots in Octave


From: Ben Abbott
Subject: Re: Saving And Loading Plots in Octave
Date: Thu, 01 Mar 2012 12:48:04 -0500

On Mar 1, 2012, at 11:01 AM, John W. Eaton wrote:

> On  1-Mar-2012, Jordi GutiƩrrez Hermoso wrote:
> 
> | I think it would be fairly simple to implement this. The Matlab .fig
> | format is simply a .mat file that contains the graphics objects
> | necessary to create that graph, and they're just a struct.
> | sure if this can be done purely in m-scripts, but I think it should
> | just be a simple matter of reading and writing a struct to a .mat file
> | which Octave can already do, and then creating a plot from that
> | struct, which I don't know if it can be done already or not.
> 
> Saving should be fairly straightforward.  I'm not sure that it is
> necessary for the hgsave function to use precisely the same
> fieldnames.  For example, I supposed "hgS_070000" is some kind of
> Matlab figure handle version number encoding, but what meaning does
> that have for Octave?
> 
> I suppose the hgload function could work recursively and do something
> like
> 
>  loop over the elements of the structure array (I assume each should
>  be a graphics object)
>    for each 'type' found
>      create the object and set its properties
>    for each of the 'children' found
>      create the child object and insert it as a child of the current object
> 
> I haven't tried it, but I don't see why this can't all be done in a .m
> file.
> 
> It would be great if someone would like to work on this project.
> 
> I know that some people may be tired of me saying this, but if you
> want to contribute to Octave, it is essential that you not base your
> work in any way on code from Matlab, should you happen to have it
> available to you.
> 
> jwe

If I infer correctly, Octave and Matlab fig-files contents would be different ?

I think that is a good idea.

Ben




reply via email to

[Prev in Thread] Current Thread [Next in Thread]