Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Chris Elvidge Newsgroups: comp.graphics.apps.gnuplot Subject: Re: For loop not working as I expected - but now solved Date: Mon, 19 Feb 2018 15:25:33 +0000 Organization: A noiseless patient Spider Lines: 32 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 19 Feb 2018 15:25:33 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="1135b11d7485f79554972be89a60050e"; logging-data="18808"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mkOhXgAlbRXAXeipTjUD5q/HizcP03pU=" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: Content-Language: en-GB Cancel-Lock: sha1:ut915uiriWpgViJe23b1t17MXDA= Xref: csiph.com comp.graphics.apps.gnuplot:3879 On 19/02/2018 03:11 pm, Karl Ratzsch wrote: > Am 19.02.2018 um 15:22 schrieb Chris Elvidge: > >> I put it down to my misreading (i.e. not fully understanding what is >> going on) of this (first example) where 'plot [-10:10]' is used; 'for' >> is not mentioned: >> >> http://gnuplot.sourceforge.net/demo_svg_5.0/simple.html > > > The full syntax for plot iteration is this: > > plot {[xmin:xmax] {[ymin:ymax]}} for [i=a:b] F(x) > > , where everything in curly brackets is optional. Try > > plot [-2:2] [-5:10] x**2 > > against > > plot for [i=0:3] x**i > > xmin,xmax,ymin,ymax just give the length of the axes, while iteration > needs the "for" keyword. > Got it now - I think! Cheers again -- Chris Elvidge, England