Using pointinterval to reduce the number of points

假装没事ソ 提交于 2020-07-08 09:24:26

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/26061700/using-pointinterval-to-reduce-the-number-of-points

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!