help-octave
[Top][All Lists]
Advanced

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

Re: Sending Calculated File Names to gnuplot


From: Joe Koski
Subject: Re: Sending Calculated File Names to gnuplot
Date: Mon, 12 Apr 2004 13:26:54 -0600
User-agent: Microsoft-Entourage/10.1.4.030702.0

on 4/12/04 12:33 PM, Joe Koski at address@hidden wrote:

> on 4/12/04 11:16 AM, Jonathan C. Webster at address@hidden wrote:
> 
>> I think you are almost there.  Try using sprintf to construct the Octave
>> command string with  all
>> the proper names in place and then "eval( ...)" to execute that string.
>> 
>> Jonathan Webster
> 
> Thanks Jonathan, after some experimentation, the correct magical incantation
> seems to be 
> 
> eval(sprintf('gset output "%s"\n',graph_file));
> 
> I ended up putting a "replot" after each plot statement in the loop, and
> that seems to work.

For correctness, when I ungrouped the figure in Adobe Illustrator, I found
that I didn't need replot. It just duplicated the plot on top of itself. The
first plot output to aifm statement was enoungh.

Joe Koski


> The only other trick was to remember to take the
> figure() statement out of the loop. figure() kept resetting the output to
> the normal screen output, thus preventing replot from working. Tricky, but
> now it works.
> 
> Joe Koski
>> 
>> Joe Koski wrote:
>>> I'm trying to set up a separate standalone loop in Octave that is dedicated
>>> solely to making Adobe Illustrator (gset term aifm) copies of some
>>> multiframe plots. The plot arrangement is the same for each plot page with
>>> three subplots, but the number of plot pages varies with the run. I would
>>> prefer to calculate the file name with a statement such as
>>> 
>>>    graph_file = (['Mode_',int2str(i),'.ai']);
>>> 
>>> which gives me the file name that I want. My question: What is the best way
>>> to feed the calculated file name to gnuplot? I've tried "gset output
>>> graph_file" with and without quotes around graph_file. With quotes, it gives
>>> me an output file called graph_file, as expected. Without quotes, Octave
>>> complains. Is there a non-gnuplotism to do this. How about a "sprintf"
>>> workaround? I tried with sprintf, but no cigar, yet.
>>> 
>>> Joe Koski
>>> 
>>> 
>>> 
>>> -------------------------------------------------------------
>>> 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
>>> -------------------------------------------------------------
>>> 
>>> 
>> 
>> 
>> 
>> -------------------------------------------------------------
>> 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
>> -------------------------------------------------------------
>> 
> 
> 
> 
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
> 



-------------------------------------------------------------
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]