LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Gnuplot (http://www.linuxquestions.org/questions/linux-software-2/gnuplot-284434/)

allycavs 01-31-2005 08:21 AM

Gnuplot
 
Hi is it possible to put all your gnuplot commands into the one file and run it that way rather than typing each line in one at at time into the shell every time you want to run GNUPLOT. Thats very repetitive work. I just want to run a file which will run GNUPLOT with a few settings. A nice twist on it that the file would take 1 parameter (a filename -eg plotdata.txt) and plot that data. I want to run a file that would set the grid and ranges,etc

an easy example

gnuplot
set xrange[0:65]
set yrange [0:0.2]
plot "graph.txt" using 1:2 title "GRAPH" with lines

then if i want to run gnu plot again with different file I have to retype everything again.

michaelk 01-31-2005 09:41 AM

You can save / load settings.
http://www.fnal.gov/docs/products/gn...l/gnuplot.html

allycavs 02-02-2005 05:18 AM

Thanks michaelk
just one more thing. I am after downloading 2 versions of gnuplot to run on windows. One was a zip file that is curropt. The other was a .exe which I think was a self extracting installation. That too didnt work. Would you know where to find a working version og gnuplot for windows

cheers

michaelk 02-02-2005 09:47 AM

Have you tried this site:
http://www.gnuplot.info/download.html

shengchieh 02-02-2005 04:17 PM

Here is a sample script file I use (i.e., my blood pressure script)

$ cat bpanal1.scr
#/bin/sh
cat > temp.dat <</EOF
set xrange [24:54]
set yrange [60:160]
set xtic (24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54)
set ytic (60,70,80,90,100,110,120,130,140,150,160)
set time
set grid
set xlabel "time (months after Dec 31, 2000)"
set ylabel "blood pressure"
set title "time vs. blood pressure"
plot "bpaverage.dat" using 1:2 title ' systolic morning' with lines, \
"bpaverage.dat" using 1:3 title 'diastolic morning' with lines, \
"bpaverage.dat" using 1:4 title ' systolic night' with lines, \
"bpaverage.dat" using 1:5 title ' diastolic night' with lines
pause 9
set output "bpanal1.ps"
set terminal postscript color
replot
/EOF
gnuplot < temp.dat
rm temp.dat

You could create a settings.dat file with a few settings.
Then
gnuplot < settings.dat

Sheng-Chieh

allycavs 02-04-2005 07:31 AM

Thanks everyome I have it figured out now. Windows version of GNUPLOT doesnt work under a certain VGA settings. The settings I have. Pity- ill just stick to the linux one for now


All times are GMT -5. The time now is 05:12 PM.