Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: plot datafile with a blank between +- and some data Date: Thu, 4 Apr 2019 23:47:42 +0200 Organization: solani.org Lines: 19 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1554414461 2039 127.0.0.43 (4 Apr 2019 21:47:41 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 4 Apr 2019 21:47:41 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: Cancel-Lock: sha1:zAr72rxQkndmp3VNkim4DLJh0cg= Content-Language: de-DE-1901 X-User-ID: eJwFwYEBwCAIA7CXLIUi5yDT/09YEhQ06Qp5vHjMIRvnWnQU7if0iFq+mbvMLBeaXu4EdX4GFQ+i Xref: csiph.com comp.graphics.apps.gnuplot:4176 Am 04.04.2019 um 10:10 schrieb Jörg Buchholz: > On 03.04.2019 22:06, Karl Ratzsch wrote: >> col1(st) = st[1:2] * 1.0 >> col4(st) = (st[28:28] eq "-" ? -1 : 1) * st[29:34] >> stcol(n) = stringcolumn(n) >> >> set table >> plot $dat us (col1(stcol(1))):(col4(stcol(1))) with table >> unset table > > > Thanks for your solution. There are some more columns. So I think, for > me, it is easer do handle the datafile with sed. Me too. If the format is not totally fixed like in your example, this becomes bedlam with gnuplot string evaluation. Certainly possible, but it is probably easier to learn regular expressions. :-)