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:42:41 -0500

On Mar 1, 2012, at 9:27 AM, Juan Pablo Carbajal wrote:

> On Thu, Mar 1, 2012 at 1:57 PM, Ben Abbott <address@hidden> wrote:
> 
>> On Mar 1, 2012, at 4:27 AM, silviutp wrote:
>> 
>>> Is it possible to save an Octave figure (a plot) so I can load it and modify
>>> it later ?
>>> I know how to save with /print -dXXXX filename /but how can I load it ?
>>> 
>>> Thank you!
>> 
>> Matlab has a saveas() function that supports the format "fig". This saves a 
>> fig-file which contains all the properties needed to reconstruct the figure.
>> 
>> There is a related hgsave() function as well.
>> 
>> The objects saved may be restored using Matlab's open() function.
>> 
>> These features are currently missing from Octave. My impression is that an 
>> m-file can be written to do these jobs.
>> 
>> If you or someone else is interested in writing one and contributing to 
>> Octave, we can always use another volunteer!
>> 
>> Ben
> 
> Saving plots to SVG format would also be cool, since data could be
> retrieved (same for most vector formats). For svg, there is the Free
> file inkex.py that would make reading and saving very easy. The
> package geometry has an object main/geometry/io/@svg that does very
> simple path retrieval.
> 
> Or the suggestion is to develop save/read fig format?

The doc-string for saveas() doesn't mention it, but SVG is supported.

        figure (1)
        clf
        plot (rand (3))
        saveas (gcf, "figure1.svg", "svg")

Ben


reply via email to

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