LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-31-2005, 08:21 AM   #1
allycavs
LQ Newbie
 
Registered: Dec 2004
Posts: 6

Rep: Reputation: 0
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.
 
Old 01-31-2005, 09:41 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
You can save / load settings.
http://www.fnal.gov/docs/products/gn...l/gnuplot.html
 
Old 02-02-2005, 05:18 AM   #3
allycavs
LQ Newbie
 
Registered: Dec 2004
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 02-02-2005, 09:47 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
Have you tried this site:
http://www.gnuplot.info/download.html
 
Old 02-02-2005, 04:17 PM   #5
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Rep: Reputation: 30
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
 
Old 02-04-2005, 07:31 AM   #6
allycavs
LQ Newbie
 
Registered: Dec 2004
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gnuplot 4.0.0 ines Linux - Software 1 04-28-2005 02:26 PM
need help for gnuplot eph Linux - Newbie 1 08-23-2004 08:41 AM
gnuplot masters, i need your help Claus Linux - Software 2 11-27-2003 10:07 PM
about gnuplot Rex_chaos Linux - Software 0 09-25-2003 08:50 AM
gnuplot: xgfe adam_boz Linux - Newbie 0 09-13-2002 07:03 PM


All times are GMT -5. The time now is 09:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration