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


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

Re: want to color each 50 data points differently from a list of 150 data points

From Jörg Buchholz <bookwood4new@freenet.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: want to color each 50 data points differently from a list of 150 data points
Date 2020-03-05 09:34 +0100
Organization A noiseless patient Spider
Message-ID <r3qdif$uh7$1@dont-email.me> (permalink)
References <88a66e46-f453-4ad8-871f-73efe7bdfd18@googlegroups.com>

Show all headers | View raw


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

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


Thread

want to color each 50 data points differently from a list of 150 data points satyajitkhatua09@gmail.com - 2020-03-04 07:13 -0800
  Re: want to color each 50 data points differently from a list of 150 data points Jörg Buchholz <bookwood4new@freenet.de> - 2020-03-05 09:34 +0100
  Re: want to color each 50 data points differently from a list of 150 data points Gavin Buxton <gavinbuxton@gmail.com> - 2020-03-05 05:56 -0800
  Re: want to color each 50 data points differently from a list of 150 data points Jörg Buchholz <bookwood4new@freenet.de> - 2020-03-05 20:44 +0100
  Re: want to color each 50 data points differently from a list of 150 data points SATYAJIT KHATUA <satyajitkhatua09@gmail.com> - 2020-03-06 06:06 -0800

csiph-web