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 14:22:03 +0000 Organization: A noiseless patient Spider Lines: 35 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 14:22:04 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="1135b11d7485f79554972be89a60050e"; logging-data="24376"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PF98VmEsGI2cH+WmUX+CBrlv1SXRnuJY=" 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:K1TnL/Y8n8/YkNfvhGeoeklQZwo= Xref: csiph.com comp.graphics.apps.gnuplot:3877 On 19/02/2018 01:26 pm, Karl Ratzsch wrote: > Am 19.02.2018 um 13:50 schrieb Chris Elvidge: > >> plot for [j=1:7] F(8-j) u 1:4 w l lw 2 lc rgb "orange" noti, for [j=1:7] >> F(8-j) u 1:5 w l lw 2 lc rgb "web-green" noti >> >> Note the extra "for" after the plot command. Could this be a bug in the >> manual? > > Sorry, I totally overlooked that! Of course it needs to be "for [:]" in > both the first and the second subplot. Where does the manual say > otherwise? That would be an error and you should file a bug report. > > The command > > plot [j=1:7] dataf ... > > should assign the value 1 to "j", and make a plot with abscissa > range[1:7]. (The assignment is not actually done, but the parser also > doesn't throw an error. It arguably should do one or the other, so > that's a small bug.) 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 Anyhow, thanks for the pointers. With any luck my skills will improve. Cheers -- Chris Elvidge, England