Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #4176

Re: plot datafile with a blank between +- and some data

Path csiph.com!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Karl Ratzsch <mail.kfr@gmx.net>
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 <q85u1t$1vn$1@solani.org> (permalink)
References <q81kck$ifh$1@dont-email.me> <q82uah$dg1$1@dont-email.me> <q833op$5u4$1@solani.org> <q84e5s$i2f$1@dont-email.me>
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 <q84e5s$i2f$1@dont-email.me>
Cancel-Lock sha1:zAr72rxQkndmp3VNkim4DLJh0cg=
Content-Language de-DE-1901
X-User-ID eJwFwYEBwCAIA7CXLIUi5yDT/09YEhQ06Qp5vHjMIRvnWnQU7if0iFq+mbvMLBeaXu4EdX4GFQ+i
Xref csiph.com comp.graphics.apps.gnuplot:4176

Show key headers only | View raw


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. :-)

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar


Thread

plot datafile with a blank between +- and some data Jörg Buchholz <bookwood4new@freenet.de> - 2019-04-03 08:38 +0200
  Re: plot datafile with a blank between +- and some data Jörg Buchholz <bookwood4new@freenet.de> - 2019-04-03 20:33 +0200
    Re: plot datafile with a blank between +- and some data Karl Ratzsch <mail.kfr@gmx.net> - 2019-04-03 22:06 +0200
      Re: plot datafile with a blank between +- and some data Jörg Buchholz <bookwood4new@freenet.de> - 2019-04-04 10:10 +0200
        Re: plot datafile with a blank between +- and some data Karl Ratzsch <mail.kfr@gmx.net> - 2019-04-04 23:47 +0200

csiph-web