Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Olaf Schultz Newsgroups: comp.graphics.apps.gnuplot Subject: Re: animation from data files Date: Wed, 2 Nov 2022 16:29:13 +0100 Lines: 51 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 8zj9Pkf4be+E12XJsB5L7AI5yaWaNn8XppiS3OAM8CUP1FxELe Cancel-Lock: sha1:ZumgVOUAzyzTqi7yfArnI7gUpb8= User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:107.0) Gecko/20100101 Thunderbird/107.0 Content-Language: de-DE In-Reply-To: Xref: csiph.com comp.graphics.apps.gnuplot:4495 Am 02.11.22 um 06:45 schrieb Shahid Maqbool: > Dear all, > > I have data files in the order like: > > data_100.dat > data_200.dat > data_300.dat > ... > data_10000.dat > > here 100, 200, 300, ..., 10000 are the time steps. > > I can successfully plot surface plot for data file e.g., 'data_10.dat' with the command i.e., > > splot 'data_100.dat' matrix with pm3d notitle > > Now, i want to make animation for my data files to see the > continuous evolution of the system. > > I have gone throught the book 'Gnuplot in Action' and section 11.5 shows some animations, but it is not telling about loading different files. Also the online demos like > > https://gnuplot.sourceforge.net/demo/animate2.html > > are not very helpful in this case. > > So my question is, which commands or keywords should i use to load the continuous files and display the animation on the console? > > Thanks a lot. > > Best regards, > Shahid Here something like that (for a temperature-profile in the soil): set grid set terminal gif animate delay 0.1 stats "reform4anim.csv" nooutput set output "animated.gif" set xrange [0:15] set yrange [-200:10] do for [i=1:int(STATS_blocks):4] {plot "reform4anim.csv" u 2:1 index (i-1) with linespoints t "\@time","" u 2:1:3 index (i-1) w labels t "","Bodensonde_Statistik_h.csv" u 3:1 t "max" lc "red","" u 5:1 t "min" lc "blue","" u 4:1 t "avg" lc "black"} HTH, Olaf