Path: csiph.com!news.mixmin.net!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: animation from data files Date: Tue, 8 Nov 2022 07:01:26 +0100 Organization: A noiseless patient Spider Lines: 56 Message-ID: References: <07acf207-092d-4419-82f2-f565a2f3d5e8n@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 8 Nov 2022 06:01:24 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="5385bfa6c6d7a48ca45eeb6d72387beb"; logging-data="4052589"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NYs65maLr36Px69wzO6hZG+cfdLdj2Fc=" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Cancel-Lock: sha1:jYjb3CZnI6VCPqo/uJlwmH1XQMU= In-Reply-To: <07acf207-092d-4419-82f2-f565a2f3d5e8n@googlegroups.com> Content-Language: de-DE, en-GB Xref: csiph.com comp.graphics.apps.gnuplot:4499 On 08.11.2022 03:58, Shahid Maqbool wrote: > On Monday, 7 November 2022 at 6:53:13 pm UTC+9, rasoul...@gmail.com > wrote: >> Hi >> >> I think that there is no need to use %f, and you can put the name >> of the file and its definition into the loop, and then it works >> better! >> >> >> n=100 while (n<=10000) { fname = sprintf('data_%d.dat',n) plot >> fname n=n+100 } >> >> >> >> >> On Saturday, November 5, 2022 at 8:09:37 PM UTC+1, Karl Ratzsch >> wrote: >>> Something like this? >>> >>> fname(n) = sprintf('data_%.f.dat',n) >>> >>> n=100 while (n<=10000) { plot fname(n) n=n+100 } >>> >>> >>> >>> > > Hi all, > > Following your suggestions i wrote it like that: > > set grid set terminal gif animate delay 0.1 fname(n) = > sprintf('data_%d.dat',n) n=100 while (n<=10000){ splot fname(n) > matrix with pm3d notitle n=n+100 } > > or > > set grid set terminal gif animate delay 0.1 You must specify a output file name. set out 'filename.gif' > n=100 while (n<=10000){ fname = sprintf('data_%d.dat',n) splot fname > matrix with pm3d notitle n=n+100 } > > > but i always get this error: > > more> ;splot fname(n) matrix with pm3d notitle ;n=n+100; ^ cannot > output binary data to wgnuplot text window > > gnuplot>