如何在两个图上绘制垂直线?

How to draw vertical lines over two diagrams?

由于 SF 似乎还有其他问题,因此很难找到这个问题的答案。我已经知道如何使用(设置)多图绘制 2 个图表。但是我怎样才能在两个图上画一些垂直线。例如。

set parametric
set trange [a:b]
plot 16,t

我不知道如何在两个地块上做到这一点。 该图应如下所示:http://i.stack.imgur.com/90Uue.png

这是一个代码片段,说明了如何做到这一点(尽管它需要一些对齐调整)。

set multiplot

# plot 1
set origin 0,0
set size  1,.5
set xrange [0:2*pi]
set yrange [-1.1:1.1]
plot sin(x)

# plot 2
set origin 0,.5
set size 1,.5
plot cos(x)

# line
set origin 0,0
set size 1,1
unset xtics
unset ytics
unset xlabel
unset ylabel
unset border
set parametric
plot 1,t

unset  multiplot

通常,我使用set arrow ... nohead画竖线。为了将它们绘制在两个图上,我将使用 screen 坐标作为 y 值:

set multiplot layout 2,1
set xrange [0:300]
set arrow 1 from first 16,screen 0.05 to first 16, screen 0.95 nohead lc rgb 'red' lw 2
set arrow 2 from first 256,screen 0.05 to first 256, screen 0.95 nohead lc rgb 'red' lw 2

plot x
unset arrow

plot 2*x
unset multiplot