Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using pointinterval to reduce the number of points

Tags:

gnuplot

With pointinterval, it is possible to tell Gnuplot when to insert the point on the line. Now, by setting that to -1, the line doesn't go though the point. For example

pi -1

----<>----<>----<>----<>----<>----<>----<>----<>----<>----

pi 2

----<->----------<->----------<->----------<->----------<->----

As you can see, using values other than -1 will insert the line inside the point.

I want to use positive pi in order to reduce the number of visible points and at the same time I want to see that the line doesn't go through the point. Something like this

----<>----------<>----------<>----------<>----------<>----

How that is possible?

like image 733
mahmood Avatar asked Sep 26 '14 14:09

mahmood


1 Answers

Just use a larger, negative number like pi -5:

set xrange [0:1]
plot '+' using 1:($1**2) pi -5 pt 6 lw 2 ps 1.5 w lp t 'pi -5', \
     '+' using 1:($1**2 + 0.1) pi 5 pt 6 lw 2 ps 1.5 w lp t 'pi 5'

enter image description here

like image 65
Christoph Avatar answered Oct 19 '22 19:10

Christoph