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 Date: Mon, 19 Feb 2018 08:15:19 +0100 Organization: solani.org Lines: 20 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1519024519 13108 eJwFwYEBwCAIA7CXQGg7z4Ep/59ggqDzVxJMDObAymy0mKPO9hXW/ISJ617qKjEmoYN9tz8PbhCc (19 Feb 2018 07:15:19 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 19 Feb 2018 07:15:19 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Content-Language: de-DE-1901 X-User-ID: eJwFwYEBwDAEBMCVEDzjtOT3HyF3cVJz4BnpwWBRpP+Zb7PRzlY3PeTCyjFUFGSvOu22GB8avRDo X-NNTP-Posting-Host: eJwFwYEBwCAIA7CXVGgH52iB/09YAuOmPifoGIwotNXNK49q8tkDm6eQweO+0DORWrPpqh8szhF2 Cancel-Lock: sha1:TFITpOL/Z2nWUbvdccyMEx7/h7s= In-Reply-To: Xref: csiph.com comp.graphics.apps.gnuplot:3874 Am 17.02.2018 um 17:46 schrieb Chris Elvidge: > plot [j=1:7] F(8-j) u 1:4 w l lw 2 lc rgb "orange" t "CPU", '' u 1:5 w l > lw 2 lc rgb "green" t "GPU" The second part of plot [i=1:4] fname(i) us 1:2, '' us 1:2 cannot work. '' just contains the last file name, in verbatim, that was in the plot command. It doesn't expect a function, and especially cannot contain the whole iteration. The error message could be a bit clearer, but obviously nobody thought of the specific misuse you tried. ;-) You have to repeat the iteration : plot [i=1:4] fname(i) us 1:2 w lc i, for [i=1:4] fname(i) us 1:2 w lc i Best, Karl