|
From: William Xu <wil...@gm...> - 2007-11-02 03:52:19
|
Hans-Bernhard Bröker <HBB...@t-...> writes:
> William Xu wrote:
>>>From the manual, i manage to do the filtering with the following trick:
>
> ... what filtering? You've removed all context, so it's hard to know
> what you might be talking about.
For example,
,----
| #a b c
| 1 3 5
| 1 4 9
| 2 3 7
| 1 2 6
`----
I'd like to draw (b, c) points where a == 1.
>> ,----
>> | plot 'result.log' using ($4 == 1 $3 : 1/0):5 title '1 session' with linespoints
>> `----
>>
>> However, seems `with linespoints' part doesn't work, it display as
>> dots. What's the problem here?
>
> The problem is that you hwave way too many undefined points in your
> input. Lines can only be drawn between consequtive valid points. Looks
> like there are no two valid points without an invalid one between them,
> in your entire file.
The data file should be okay. Anyway, i find i can embed shell command
into plot, so using awk, it draws linespoints as expected.
,----
| plot "< awk '{ if($4==1) print $1, $2, $3, $4, $5}' result.log" using 3:5 title '1 session' with linespoints
`----
which should do the same as:
>> ,----
>> | plot 'result.log' using ($4 == 1 $3 : 1/0):5 title '1 session' with linespoints
>> `----
right?
--
William
|