Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

All the simple programs have been written.


computers / comp.graphics.apps.gnuplot / Re: want to color each 50 data points differently from a list of 150 data points

SubjectAuthor
* want to color each 50 data points differently from a list of 150 data satyajitkhatua09
+- Re: want to color each 50 data points differently from a list of 150Jörg_Buchholz
+- Re: want to color each 50 data points differently from a list of 150Gavin Buxton
+- Re: want to color each 50 data points differently from a list of 150Jörg_Buchholz
`- Re: want to color each 50 data points differently from a list of 150SATYAJIT KHATUA

1
Subject: want to color each 50 data points differently from a list of 150 data points
From: satyajit...@gmail.com
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 4 Mar 2020 15:13 UTC
X-Received: by 2002:a0c:e982:: with SMTP id z2mr2403261qvn.22.1583334817286;
Wed, 04 Mar 2020 07:13:37 -0800 (PST)
X-Received: by 2002:a05:6830:1313:: with SMTP id p19mr2732420otq.126.1583334816851;
Wed, 04 Mar 2020 07:13:36 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.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: Wed, 4 Mar 2020 07:13:36 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=203.110.242.10; posting-account=oR6wSwkAAADF81VjJsl-SluthQYe3SFY
NNTP-Posting-Host: 203.110.242.10
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>
Subject: want to color each 50 data points differently from a list of 150 data points
From: satyajit...@gmail.com
Injection-Date: Wed, 04 Mar 2020 15:13:37 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Dear Users,
          Recently I have generated a data file that contains 150 data points. For comparing purpose I want to color each 50 data points out of 150 in different color. I have googled for it thinking if there is any solutions related to this problem, but I couldn't really find any. As I not an expert in Gnuplot, so I have to ask this question here. Please help me out to solve the problem.

Thanks in advance,
Satyajit Khatua


Subject: Re: want to color each 50 data points differently from a list of 150 data points
From: Jörg_Buchholz
Newsgroups: comp.graphics.apps.gnuplot
Organization: A noiseless patient Spider
Date: Thu, 5 Mar 2020 08:34 UTC
References: 1
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: bookwood...@freenet.de (Jörg_Buchholz)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: want to color each 50 data points differently from a list of 150
data points
Date: Thu, 5 Mar 2020 09:34:25 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <r3qdif$uh7$1@dont-email.me>
References: <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 5 Mar 2020 08:34:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="1e750b73e4ba83b5262a079b46594284";
logging-data="31271"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19mKO768YnP9W8yFXrmIGT/CIUWyKk/bCY="
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.5.0
Cancel-Lock: sha1:yZ5+BAubafsUJQwvEZX2lE7pv0s=
In-Reply-To: <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>
Content-Language: en-US
View all headers
On 04.03.2020 16:13, satyajitkhatua09@gmail.com wrote:
Dear Users, Recently I have generated a data file that contains 150
data points. For comparing purpose I want to color each 50 data
points out of 150 in different color. I have googled for it thinking
if there is any solutions related to this problem, but I couldn't
really find any. As I not an expert in Gnuplot, so I have to ask this
question here. Please help me out to solve the problem.

Thanks in advance, Satyajit Khatua


This example gives you each 3 points in a different color:

reset
set encoding utf8
set grid
set xrange [0:10]
set yrange [0:10]
$data << EOD
1   4   6   5   9   2   7   6
2   5   7   3   2   7   2   8
3   7   3   9   3   2   1   0
4   7   5   2   8   1   2   8
5   5   2   9   4   2   6   1
6   7   3   9   3   2   1   0
7   5   7   3   2   7   2   8
8   7   3   9   3   2   1   0
9   7   5   2   8   1   2   8
EOD
set pointsize 5
plot $data every ::0::2 u 1:2 w p pt 7 lc 'red', $data every ::3::5 u
1:2 w p pt 7 lc 'blue', $data every ::6::9 u 1:2 w p pt 7 lc 'green'


"every" seams to be one solution.

Jörg


Subject: Re: want to color each 50 data points differently from a list of 150 data points
From: Gavin Buxton
Newsgroups: comp.graphics.apps.gnuplot
Date: Thu, 5 Mar 2020 13:56 UTC
References: 1
X-Received: by 2002:a0c:c70b:: with SMTP id w11mr6353440qvi.246.1583416611604;
Thu, 05 Mar 2020 05:56:51 -0800 (PST)
X-Received: by 2002:a9d:2015:: with SMTP id n21mr4779803ota.29.1583416611212;
Thu, 05 Mar 2020 05:56:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!aioe.org!peer01.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Thu, 5 Mar 2020 05:56:50 -0800 (PST)
In-Reply-To: <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=24.3.60.64; posting-account=yC8mVwkAAADuRBqBIdPVfec50l5EMdYn
NNTP-Posting-Host: 24.3.60.64
References: <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <03b33903-7d44-416e-a6b9-b63e842c92f5@googlegroups.com>
Subject: Re: want to color each 50 data points differently from a list of 150
data points
From: gavinbux...@gmail.com (Gavin Buxton)
Injection-Date: Thu, 05 Mar 2020 13:56:51 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1495
X-Received-Body-CRC: 3400277809
View all headers
You'll find some very elegant solutions here, but if I understand it correctly you could just open the file and put a couple of carriage returns whenever you want to separate the points. Then

plot 'data.dat' i 0, '' i 1 , '' i 2

where i stands for index.


Subject: Re: want to color each 50 data points differently from a list of 150 data points
From: Jörg_Buchholz
Newsgroups: comp.graphics.apps.gnuplot
Organization: A noiseless patient Spider
Date: Thu, 5 Mar 2020 19:44 UTC
References: 1
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: bookwood...@freenet.de (Jörg_Buchholz)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: want to color each 50 data points differently from a list of 150
data points
Date: Thu, 5 Mar 2020 20:44:18 +0100
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <r3rkqi$6q0$1@dont-email.me>
References: <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 5 Mar 2020 19:44:18 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5bf33c0efb977125baafbd6224d76f02";
logging-data="6976"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rnbUZccLHct1qs8PrCbRdFcXAAa1SXqo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
Thunderbird/68.5.0
Cancel-Lock: sha1:Z+cQdQQTm5TbqHAie9hnOxnNefo=
In-Reply-To: <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>
Content-Language: en-GB
View all headers
On 04/03/2020 16:13, satyajitkhatua09@gmail.com wrote:
Dear Users, Recently I have generated a data file that contains 150
data points. For comparing purpose I want to color each 50 data
points out of 150 in different color. I have googled for it thinking
if there is any solutions related to this problem, but I couldn't
really find any. As I not an expert in Gnuplot, so I have to ask this
question here. Please help me out to solve the problem.

Thanks in advance, Satyajit Khatua


you can do it also with "plot for":

reset
set encoding utf8
set grid
set xrange [0:10]
set yrange [0:10]
$data << EOD
1   4   6   5   9   2   7   6
2   5   7   3   2   7   2   8
3   7   3   9   3   2   1   0
4   7   5   2   8   1   2   8
5   5   2   9   4   2   6   1
6   7   3   9   3   2   1   0
7   5   7   3   2   7   2   8
8   7   3   9   3   2   1   0
9   7   5   2   8   1   2   8
EOD
set pointsize 5
plot for [i = 0:8:3] $data every ::i::(i+2) u 1:2 w p pt 7


So if you will do it with your 150 points in column 1 (X-Value) and
column 2 (Y-Value) in the file "data.dat"

plot for [i = 1:150:50] 'data.dat' every ::(i-1)::(i+48) u 1:2 w p pt 7

Jörg


Subject: Re: want to color each 50 data points differently from a list of 150 data points
From: SATYAJIT KHATUA
Newsgroups: comp.graphics.apps.gnuplot
Date: Fri, 6 Mar 2020 14:06 UTC
References: 1
X-Received: by 2002:ac8:7cb0:: with SMTP id z16mr3147310qtv.276.1583503601022;
Fri, 06 Mar 2020 06:06:41 -0800 (PST)
X-Received: by 2002:a9d:66d1:: with SMTP id t17mr2484227otm.235.1583503600751;
Fri, 06 Mar 2020 06:06:40 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.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: Fri, 6 Mar 2020 06:06:40 -0800 (PST)
In-Reply-To: <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=203.110.242.20; posting-account=oR6wSwkAAADF81VjJsl-SluthQYe3SFY
NNTP-Posting-Host: 203.110.242.20
References: <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1e5e01ab-e2d9-4a4e-9c3b-27a80ba60089@googlegroups.com>
Subject: Re: want to color each 50 data points differently from a list of 150
data points
From: satyajit...@gmail.com (SATYAJIT KHATUA)
Injection-Date: Fri, 06 Mar 2020 14:06:41 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
Thanks both of you for your suggestions. Will try these out.


1
rocksolid light 0.7.2
clearneti2ptor