Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: For loop not working as I expected - but now solved Date: Mon, 19 Feb 2018 14:26:52 +0100 Organization: solani.org Lines: 31 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1519046813 28496 eJwFwQUBADAIALBK+CEO2j/CN2VD6yemJnp6A5QUlaDVC4IVHj1TTx4NucNSeRrX8pEOfiReEVI= (19 Feb 2018 13:26:53 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 19 Feb 2018 13:26:53 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 X-User-ID: eJwFwQkBwDAIA0BLLU8IcgYD/xJ654qLDoPDfH1nLjGe80nxP8s0ldYqCwi2mkItGxYZJ/IBI1kQ8A== Cancel-Lock: sha1:q3WUejiE7irsd9aMheJXqBHxYlU= In-Reply-To: X-NNTP-Posting-Host: eJwFwYEBwCAIA7CXhJaC50zQ/09YEpCpkwoxXryrYn3ccdAzsc9i0V3m+VA2XRurcti4UOIHCt4QJw== Content-Language: de-DE-1901 Xref: csiph.com comp.graphics.apps.gnuplot:3876 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.) > Strangely, with "plot for" and '' as the second file specifier, I get > all the files for the first plot, but only the last file for the second > plot. That's the expected behaviour. The special filename '' just contains the last file(name) that was plotted, not the whole iteration. Karl