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

时间:2015-07-21 12:01:53

标签: line gnuplot

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

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

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

2 个答案:

答案 0 :(得分:2)

通常,我使用:fighting cls set /a yourhit=%random% %%dmg% set /a theirhit=%random% %%theirdmg% set /a armor = %armor% - %theirhit% if %theirhit% gtr %armor% set /a armor = 0 & set /a hp = %hp% - %theirhit% if %yourhit% geq %theirhp% goto winner if %theirhit% gtr %hp% goto loser set /a theirhp = %theirhp% - %yourhit% echo. call :fightheadsup echo - You hit them for %yourhit%! echo. echo - They hit you for %theirhit%! echo. echo 1.Continue Attacking echo 2.Return to Fight Menu echo. set /p input12=Enter: if %input12% equ 1 goto fighting if %input12% equ 2 goto fightmenu goto fightmenu 绘制垂直线。为了在两个图上绘制它们,我会使用set arrow ... nohead坐标作为y值:

screen

enter image description here

答案 1 :(得分:0)

这是一个代码片段,说明了如何执行此操作(尽管需要对齐一些调整)。

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