开发者

Gnuplot script combine "embedded" format with indexed blocks

开发者 https://www.devze.com 2023-02-18 22:34 出处:网络
Basically, I want to combine http://t16web.lanl.gov/Kawano/gnuplot/datafile2-e.html#7.4 and http://t16web.lanl.gov/Kawano/gnuplot/datafile2-e.html#7.2. I\'m trying to get a gnuplot script with embedde

Basically, I want to combine http://t16web.lanl.gov/Kawano/gnuplot/datafile2-e.html#7.4 and http://t16web.lanl.gov/Kawano/gnuplot/datafile2-e.html#7.2. I'm trying to get a gnuplot script with embedded plaintext d开发者_开发百科ata points to plot using three different colours all in one plot command, like so:

plot \
    "-" index 0 title "waveform" with lines, \
    "-" index 1 title "-trig"    with lines, \
    "-" index 2 title "+trig"    with lines
    1418    -0.04
    1419    -0.04
    1420    +5.28
    1421    +5.20
    1422    +5.16

    1418    3.66
    1422    3.66

    1418    3.86
    1422    3.86
end

However, it just displays the three blocks in one colour and throws an error on the second and third index commands.


Never mind, I finally guessed it into working:

plot \
    "-" title ""      with lines, \
    "-" title "-trig" with lines, \
    "-" title "+trig" with lines
    1418    -0.04
    1419    -0.04
    1420    +5.28
    1421    +5.20
    1422    +5.16
end
    1418    3.66
    1422    3.66
end
    1418    3.86
    1422    3.86
end
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号