hi,
i'm new to gnuplot, can anyone help me with the following?
I have a data file that looks kind of like this:
# this file is called data.dat
#
# i a_i b_i flag
#
1 40 20
2 44 21
3 39 27 1
4 42 15
5 47 19 1
...
in words, a_i and b_i are two sequences, and the last column is a flag that
indicates certain special points in the sequences. they appear at irregular
intervals.
I'm trying to connect these points of a_i and b_i (where flag=1).
however, the command
plot "data.dat" using 1:($4==1 ? $2 : 1/0) with lines
will not connect the points because there are undefined values in between
the points. (ending the command "with points" would plot the points, but i
want to connect them).
replacing the last column with the actual values of a_i or b_i, and plotting
1:4 would work, but i want more flexibility (adding and plotting other
sequences c_i, d_i,..., or plotting some function of a_i, b_i for the values
when flag is 1).
thanks,
z
--
View this message in context: http://www.nabble.com/connect-certain-points-of-a-graph-tp15864700p15864700.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|