Gnuplot script combines the "inline" format with indexed blocks

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 am trying to get a gnuplot script with built-in plaintext data points to build three different colors in one command:

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 simply displays three blocks in one color and throws an error in the second and third index commands.

+3
source share
1 answer

Nothing, I finally guessed that it works:

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
+1
source

All Articles