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: pantxo diribarne
Subject: Re: Saving And Loading Plots in Octave
Date: Mon, 26 Mar 2012 15:17:19 +0200

Hello,

I have given a try to this task :
wrote two m-files, hdl2struct.m and struct2hdl.m that respectively store a figure data into a structure and build a new figure with the previous structure. It currently doesn't support hggroups (bar, errorbar, contour, quiver, ...), and have limited support for colorbars, legends (positions problems, visibility not supported) and subplots are raw axes (no use of subplot function so no listeners).

The structure fields are similar to what I found in a .fig matlab file (handle, type, properties, children, special).

I don't know if I do it the right way so I wanted to submit this first attempt (see demos in hdl2struct.m) :
- hdl2struct.m recursively stores the figure properties. Colorbars, Legends, xyzlabels, titles are stored as children of the corresponding axes.
- struct2hdl.m, the workflow is the following : object is first created with minimal options then its children are created (recursively) and finally its properties are set (some of them are discarded such as deletefcn, ui...). xyzlabels and titles are "special" objects that are created by their parent so only the third step (set properties) is done.   

Pantxo

PS : my config is mac-osx 10.7.3, octave 3.6.1 (Ben Abbott's bundle)



   

Attachment: hdl2struct.m
Description: Binary data

Attachment: struct2hdl.m
Description: Binary data


reply via email to

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