help-octave
[Top][All Lists]
Advanced

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

Re: problems to generate gif graphic files:


From: Alan Robert Clark
Subject: Re: problems to generate gif graphic files:
Date: Thu, 25 Apr 2002 09:27:30 +0200 (SAST)

On Wed, 24 Apr 2002, fermin wrote:

> Hi all !!
> 
> I have a problem working with octave.
> 
> I'm having problems  to generate gif graphic files from a Octave file
> with the
> command gset output "filename" where the param filename contain path of
> file. Can i put the "filename" like a variable?
> 
> Is it possible to do it?

using eval and sprintf as in the following function:


function printEpsPng (name)
% Converts the current plot into an .eps file for printing and a .png file
% for web-browsing...
% It is called with a filename-without-extension, in typical fashion.

  eval(sprintf('gset label "%s" at screen 1,0 right', name));
  gset terminal postscript eps color;
  eval(sprintf('gset output "%s.eps"', name));
  replot;
  gset terminal png color;
  eval(sprintf('gset output "%s.png"', name));
  replot;

endfunction




> 
> May somebody help me ?
> 
> Best regard.
> 
> 
> 
> 
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
> 

-- 
Alan Robert Clark, Pr Eng     Computational Electromagnetics
Dept Elec Eng                         Wits University
Wits; Gauteng              ``Bugs are later known as features''
2050 South Africa                 Ps 111:10; Ps 37/150
Fax (+27 11)403-1929       address@hidden(Pref)
Tel (+27 11)717-7223(24hr)  <http://YingTongDiddleiPo.ee.wits.ac.za/>
     **Linux 2.2pl16(RH7.0)---the choice of a GNU generation.**



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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