Talk About Network

Google





Graphics > Gnuplot interactive function plotter > Re: flexible fi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 3347 of 3655
Post > Topic >>

Re: flexible filenames?

by merritt@[EMAIL PROTECTED] Jun 6, 2008 at 12:50 PM

In article <W392k.119074$zc6.23511@[EMAIL PROTECTED]
>,
Bart Vandewoestyne  <MyFirstName.MyLastName@[EMAIL PROTECTED]
> wrote:
>
>In the gnuplot file, i use
>
>plot "data_dim01.dat" .......
>set out "graph_dim01.eps"
>
>Creating graphs for several dimensions would require several
>similar gnuplot files with only the number for the dimension
>changed.
>
>I was wondering if gnuplot has some kind of built-in feature to
>cope with this kind of situation.  Can I somehow define a variable for
>the dimension at the beginning of my gnuplot file, and then use this
>variable in the names of the `plot' and `set out' commands?

Yes, certainly.  Here is a simple example that show 2 possible
command variants for defining the file names.

  N = 1
  outfile = "graph_dim".N.".eps"
  infile  = sprintf("data_dim%02d.eps",N)

  set output outfile
  plot infile ....
-- 
Ethan A Merritt
 




 6 Posts in Topic:
flexible filenames?
Bart Vandewoestyne <My  2008-06-06 11:20:22 
Re: flexible filenames?
merritt@[EMAIL PROTECTED]  2008-06-06 12:50:23 
Re: flexible filenames?
Bart Vandewoestyne <My  2008-06-12 15:39:57 
Re: flexible filenames?
merritt@[EMAIL PROTECTED]  2008-06-12 08:47:58 
Re: flexible filenames?
Juergen Wieferink <wie  2008-06-13 08:21:27 
Re: flexible filenames?
Tim Hoffmann <tim.hoff  2008-06-06 22:11:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 22:26:26 PST 2009.