help-octave
[Top][All Lists]
Advanced

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

Re: Saving graphic objects to file?


From: Tribo Laboy
Subject: Re: Saving graphic objects to file?
Date: Wed, 14 Apr 2010 10:39:41 +0200

On Tue, Apr 13, 2010 at 6:11 PM, Søren Hauberg <address@hidden> wrote:
> tir, 13 04 2010 kl. 11:52 -0400, skrev Ben Abbott:
>> On Tuesday, April 13, 2010, at 09:09AM, "Tribo Laboy" <address@hidden> wrote:
>> >Is it possible to save the graphics objects to file? say like this:
>> >
>> >savefig(gcf, 'MyFigure.octfig')
>> >
>> >so that they are readable and editable later?
>> >
>> >Thanks.
>> >
>>
>> This capability does not yet exist in Octave.
>>
>> However, the handle graphics properties do contain sufficient
>> information to save and restore a figure. So all that is needed is for
>> someone to take the effort to write the code to save the information,
>> and then to restore it.
>
> Attached is some simple code simply stores the values of a handle in a
> structure. The reverse operation doesn't quite work, though. I think the
> problem is that too much information is stored, so one would need to
> prune the list of properties that are stored.
>
> Søren
>


Hello!

First thanks for all the replies. I did look at the FIG files created
by Matlab. Indeed, they are structures containing the properties of
the graphical objects, so that's obviously the way to go. Søren, I
tried your code and I saw what you're talking about. Right now I don't
have the time to try to debug it (I have a deadline tomorrow), but it
is a good starting point. I'll try to look at it when I have more
time. Just a question, are we aiming at Matlab compatibility at the
level of FIG files or not? I can see how it could be helpful to send
someone on Matlab a FIG file so he can open and edit it. But because
even Matlab has sometimes problems opening FIG files created by
different versions it may be not worth the effort. What do you think?

Regards



reply via email to

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