From: Ismail A. <ism...@go...> - 2010-05-29 23:32:11
|
Hello The best way to do is to use environment variables in shell and access them in Gnuplot script Example: ------------------------------------------------------------- In the shell: export name=plot_data_file ------------------------------------------------------------- In Gnuplot script: #! /usr/bin/gnuplot name=system("echo $plot_data_file") set title name plot name.".data" using ($16 * 8):20 with linespoints notitle pause -1 ------------------------------------------------------------- Best regards, Ismail Amin Philipp Fechteler wrote: > > Hello > > Is it possible to pass arguments to a Gnuplot script (in Linux on the > command line), e.g. a file name for a data file. I would like to do the > following kind of script: > > #! /usr/bin/gnuplot > set title ARGV[1] > plot ARGV[1].data using ($16 * 8):20 with linespoints notitle > pause -1 > > This script should generate a plot with the title given as first command > line argument, an with the graph constructed from the first command line > argument added with the suffix .data. > > Best regards > Philipp > > ________________________________________________________________________ > Dipl.-Ing. Philipp Fechteler > Department Image Processing > Fraunhofer Institute for Telecommunications > Heinrich-Hertz-Institut (HHI) > Einsteinufer 37 > 10587 Berlin, Germany > Phone +49 30 31002 616 > Fax +49 30 31002 200 > Email phi...@hh... > WWW http://iphome.hhi.de/fechteler > ________________________________________________________________________ > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/command-line-arguments-to-gnuplot-scripts-tp7757834p28719227.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |