Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在GNUplot步进图中添加点_Gnuplot - Fatal编程技术网

在GNUplot步进图中添加点

在GNUplot步进图中添加点,gnuplot,Gnuplot,我有个问题。我正在使用带有以下代码的GNUplot: set terminal png set title 'Assembly ID A047457' set key autotitle columnhead set xlabel 'axial coordinate [cm]' set ylabel 'signal intensity [n/cm]' set output "output/assembly_001.png" plot 'data_gnuplot/001.txt' with st


我有个问题。我正在使用带有以下代码的GNUplot:

set terminal png
set title 'Assembly ID A047457'
set key autotitle columnhead
set xlabel 'axial coordinate [cm]'
set ylabel 'signal intensity [n/cm]'
set output "output/assembly_001.png"
plot  'data_gnuplot/001.txt' with steps notitle
我有很好的输出,我想在角落里添加点,我不知道,如何添加它们。我只能在左角添加点。你能帮我吗

和我的数据文件:

A047457
0 0.1942
5 0.3426
10 0.528
20 0.642
34 0.858
53 0.938
68 0.947
84 1.041
96 0.912
118 0.85
179 0.585
183 0.498
185 0.473
186 0.433
189 0.348
195 0.266
196 0.202
198 0.142
199 0.098

如果我正确理解了你的问题,你想把这些点放在各个角落

只需用y值“延迟”1再次绘制数据。您可以通过串行求值来实现这一点(检查帮助运算符二进制文件)。 在第三个绘图命令中
(y0=y1,y1=2,y0)
开始时为
y1=NaN
,然后为
y0=y1
,然后为
y2=$2
(数据的当前y值),但实际绘制的是
y0
。因此,每个y值都延迟一次

代码:

### placing point at all corners of a step plot
reset session

$Data <<EOD
A047457
0 0.1942
5 0.3426
10 0.528
20 0.642
34 0.858
53 0.938
68 0.947
84 1.041
96 0.912
118 0.85
179 0.585
183 0.498
185 0.473
186 0.433
189 0.348
195 0.266
196 0.202
198 0.142
199 0.098
EOD

y1=NaN
plot $Data u 1:2 w steps lw 2 lc rgb "red" notitle, \
     '' u 1:2 w p pt 7 lc rgb "blue" notitle, \
     '' u 1:(y0=y1,y1=$2,y0) w p pt 7 lc rgb "blue" notitle
### end of code
####将点放置在阶梯图的所有角落
重置会话
$Data