Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Unix is a Registered Bell of AT&T Trademark Laboratories. -- Donn Seeley


devel / comp.graphics.apps.gnuplot / plot for [i = 'list of numbers']

SubjectAuthor
* plot for [i = 'list of numbers']Jörg Buchholz
`* Re: plot for [i = 'list of numbers']Hans-Bernhard Bröker
 `- Re: plot for [i = 'list of numbers']Jörg Buchholz

1
plot for [i = 'list of numbers']

<scjvsl$9af$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: comp.graphics.apps.gnuplot
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bookwood...@freenet.de (Jörg Buchholz)
Newsgroups: comp.graphics.apps.gnuplot
Subject: plot for [i = 'list of numbers']
Date: Tue, 13 Jul 2021 14:11:01 +0200
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <scjvsl$9af$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 13 Jul 2021 12:11:01 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7508434d1982e7714dc3d40234be403d";
logging-data="9551"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NM2JybfSwZa287/7AKTulpN7JplkBU5w="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:eKjild1rugxyGjkaDzt+u/gTxPo=
Content-Language: en-GB
X-Mozilla-News-Host: news://news.eternal-september.org:119
 by: Jörg Buchholz - Tue, 13 Jul 2021 12:11 UTC

Hello,

I have a dataset with 10 columns. First I will plot most of them and I use:

plot for [i = 3:10] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)

in a second plot I will plot only column 6,8 and 9. Is there a way to
use a list of numeric or only a list of strings.

Plot for [i = 6, 8, 9] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)

or

list = "6 8 9"
plot for [i in list] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)

Does not work. A solution that works is the following, but it is little
more work.

plot for [i = 6:8:2] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2),\
for [i = 9:9] '' skip 6 u 2:i w l t sprintf("T_%i",i-2)

Jörg

Re: plot for [i = 'list of numbers']

<il5fo7Fg9ehU1@mid.dfncis.de>

 copy mid

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

 copy link   Newsgroups: comp.graphics.apps.gnuplot
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail
From: HBBroe...@t-online.de (Hans-Bernhard Bröker)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: plot for [i = 'list of numbers']
Date: Tue, 13 Jul 2021 14:37:24 +0200
Lines: 21
Message-ID: <il5fo7Fg9ehU1@mid.dfncis.de>
References: <scjvsl$9af$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.dfncis.de aS/k0SYXeY/W+ukYbD+mewEEKunSKTq1Au3bjrAJhjybKgKCk1iANknzaw
Cancel-Lock: sha1:4r25uOyL3z2f772/RIPuM8mk87c=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
In-Reply-To: <scjvsl$9af$1@dont-email.me>
Content-Language: en-US
 by: Hans-Bernhard Bröke - Tue, 13 Jul 2021 12:37 UTC

Am 13.07.2021 um 14:11 schrieb Jörg Buchholz:

> list = "6 8 9"
> plot for [i in list] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)

Close, but no cigar. The string-based list does not work like that
because its elements evaluated by the for loop are still strings.

The following would have worked, though:

plot for [i in "6 8 9"] 'file' u 2:int(i)

The following may be more useful. See "help arrays" to understand what
it does:

n = 3
array list[n] = [6, 8, 9]
plot for [i in 1:n] 'file' u 2:list[i]

Re: plot for [i = 'list of numbers']

<sclrdq$b3r$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: comp.graphics.apps.gnuplot
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bookwood...@freenet.de (Jörg Buchholz)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: plot for [i = 'list of numbers']
Date: Wed, 14 Jul 2021 07:07:07 +0200
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <sclrdq$b3r$1@dont-email.me>
References: <scjvsl$9af$1@dont-email.me> <il5fo7Fg9ehU1@mid.dfncis.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 14 Jul 2021 05:07:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a8b603fcb7233769b7f98b49dfb4a57a";
logging-data="11387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qzzWbIuXW9wrTn+jBzmPLi8O+W2rmBsA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:GJTUtnw63tPqLntqHC6eLbzKaN0=
In-Reply-To: <il5fo7Fg9ehU1@mid.dfncis.de>
Content-Language: en-GB
 by: Jörg Buchholz - Wed, 14 Jul 2021 05:07 UTC

On 13.07.2021 14:37, Hans-Bernhard Bröker wrote:
> Am 13.07.2021 um 14:11 schrieb Jörg Buchholz:
>
>> list = "6 8 9"
>> plot for [i in list] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)
>
> Close, but no cigar.  The string-based list does not work like that
> because its elements evaluated by the for loop are still strings.
>
> The following would have worked, though:
>
>
>     plot for [i in "6 8 9"] 'file' u 2:int(i)
>
> The following may be more useful.  See "help arrays" to understand what
> it does:
>
>     n = 3
>     array list[n] = [6, 8, 9]
>     plot for [i in 1:n] 'file' u 2:list[i]
>
>
Thanks a lot. At the moment I prefer your first solution, cause I
understood it "out of the box".

Jörg

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor