Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?J=c3=b6rg_Buchholz?= Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Can I use the same gnuplot script file to plot different data files? Date: Wed, 21 Nov 2018 14:23:23 +0100 Organization: A noiseless patient Spider Lines: 61 Message-ID: References: <1123688616.067028.222910@o13g2000cwo.googlegroups.com> <8392b610-487d-4688-ab1c-0cc15de51cc5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 21 Nov 2018 13:23:22 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="52ff34d47dcc31ff119b4eca11bb6187"; logging-data="18056"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+64cjyfj7GU5panY8J4SYdQvT+NDttfbc=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 Cancel-Lock: sha1:ojxmmvtaZ8ePkjV+zF7tTfCXrxk= In-Reply-To: <8392b610-487d-4688-ab1c-0cc15de51cc5@googlegroups.com> Content-Language: en-GB Xref: csiph.com comp.graphics.apps.gnuplot:4086 On 21.11.2018 12:40, srishtinagu19@gmail.com wrote: > On Wednesday, November 21, 2018 at 12:52:47 PM UTC+5:30, srisht...@gmail.com wrote: >> On Wednesday, August 10, 2005 at 9:13:36 PM UTC+5:30, Peng Yu wrote: >>> Hi, >>> >>> Suppose I have a few data files with the same format to plot, I have >>> the following script. But I have to change the last line for each data >>> file. Is there any way such that I can specify the file name as an >>> argument to gnuplot when I envoke this script file? >>> >>> Best wishes, >>> Peng >>> >>> set term postscript landscape enhanced color solid >>> set output "heat_map.eps" >>> set xlabel "X(um)" >>> set ylabel "Y(um)" >>> set view map >>> unset surface >>> set size ratio -1 >>> set pm3d >>> set palette mode RGB >>> set xtics rotate >>> set title "Error Map" >>> splot "heat_map.dat" using (-10+$1*5):(-10+$2*5):3 >> >> >> Hello , >> I just saw this topic, I am making a gnuplot script and want to know- >> How do we invoke the gnuplot script ? >> I am working with the following script below.. >> Do we have to keep a filename extension for using the script ? >> "" >> set terminal pdf >> set output "myplot.pdf" >> set contour >> set view map >> unset surface >> set cntrparam levels discrete 2.3,6.2,11.8 >> splot [0:360][0:0.9] "test1.dat" with lines >> "" >> >> Thank you. > > I am using : $gnuplot scriptname from terminal shell and also $load scriptname > but it is not working either of the ways.. What should I do ? If there is a error in your script and you use "gnuplot scriptname" from the shell then you see often nothing. From inside gnuplot, have first open gnuplot, you must use the following: gnuplot> load 'scriptname' There must be some quotes at the scriptname (' or "). If there is an error in your script, or gnuplot can't find your script, you get an error message. See "gnuplot> help load" Jörg