Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

It is surely a great calamity for a human being to have no obsessions. -- Robert Bly


devel / comp.graphics.apps.gnuplot / plotting text

SubjectAuthor
* plotting textJan Schmidt
`- Re: plotting textJörg Buchholz

1
plotting text

<43b043b7-847f-4cd7-8665-65bc3a7bbc94n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=145&group=comp.graphics.apps.gnuplot#145

  copy link   Newsgroups: comp.graphics.apps.gnuplot
X-Received: by 2002:a05:620a:468e:b0:75b:2c31:8f79 with SMTP id bq14-20020a05620a468e00b0075b2c318f79mr449105qkb.7.1686039935742;
Tue, 06 Jun 2023 01:25:35 -0700 (PDT)
X-Received: by 2002:a05:6902:1149:b0:bad:e8b:17d4 with SMTP id
p9-20020a056902114900b00bad0e8b17d4mr423518ybu.7.1686039935469; Tue, 06 Jun
2023 01:25:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Tue, 6 Jun 2023 01:25:35 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=212.185.50.243; posting-account=rJgb_goAAADJCb4ByDWrxKz-3OzMN_ob
NNTP-Posting-Host: 212.185.50.243
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <43b043b7-847f-4cd7-8665-65bc3a7bbc94n@googlegroups.com>
Subject: plotting text
From: jan.schm...@gmail.com (Jan Schmidt)
Injection-Date: Tue, 06 Jun 2023 08:25:35 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Jan Schmidt - Tue, 6 Jun 2023 08:25 UTC

Hi,

is there a way to plot a datafile with text and replace the text with numbers?

i.e. the datafile looks like

1684746646.005043 open standby 0.3
1684746646.045847 closed standby 0.2

and I want a line chart where I can see the movement from "open" to "closed" as a jump.

plot "datafile" u 1:2 replace("open",1), replace("closed",2) w l, "datafile" u 1:4 w l

Re: plotting text

<u5p7f4$12bfs$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=146&group=comp.graphics.apps.gnuplot#146

  copy link   Newsgroups: comp.graphics.apps.gnuplot
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bookwood...@freenet.de (Jörg Buchholz)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: plotting text
Date: Wed, 7 Jun 2023 08:18:13 +0200
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <u5p7f4$12bfs$1@dont-email.me>
References: <43b043b7-847f-4cd7-8665-65bc3a7bbc94n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 7 Jun 2023 06:18:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e8671cc890df7630e04fbd69dc617c7";
logging-data="1125884"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Vd+AHrYu5sqjq+wo/YNOAqVktXfcocEM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.2
Cancel-Lock: sha1:+CPR/dubDlSalI+P0MB77fOgQGo=
In-Reply-To: <43b043b7-847f-4cd7-8665-65bc3a7bbc94n@googlegroups.com>
Content-Language: de-DE
 by: Jörg Buchholz - Wed, 7 Jun 2023 06:18 UTC

On 06.06.2023 10:25, Jan Schmidt wrote:
> Hi,
>
> is there a way to plot a datafile with text and replace the text with numbers?
>
> i.e. the datafile looks like
>
> 1684746646.005043 open standby 0.3
> 1684746646.045847 closed standby 0.2
>
> and I want a line chart where I can see the movement from "open" to "closed" as a jump.
>
> plot "datafile" u 1:2 replace("open",1), replace("closed",2) w l, "datafile" u 1:4 w l

1684746646.005043 open standby 0.1
1684746646.045847 closed standby 0.2
1684746646.005043 open standby 0.3
1684746646.045847 closed standby 0.4
1684746646.005043 open standby 0.5
1684746646.045847 open standby 0.6
1684746646.005043 open standby 0.7
1684746646.045847 closed standby 0.8

plot [0:1.0][0:2.0] 'file' u 4:(strcol(2) eq "open" ? 1.0:0.0) w histeps

Jörg

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor