From: Ethan A M. <eam...@gm...> - 2013-09-04 05:50:32
|
On Tuesday, 03 September 2013, Mahmood Naderan wrote: > I think awk is faster than strcol. Is that right? Both awk and strcol have to actually parse the line, so I suspect if speed is the issue then plot '< grep M file' is faster than either of them. Ethan > > > > Regards, > Mahmood > > > > ________________________________ > From: Leo Butler <l_b...@us...> > To: BBands <bb...@gm...> > Cc: gnu...@li... > Sent: Wednesday, September 4, 2013 12:53 AM > Subject: Re: [Gnuplot-info] ploting if a special character exist in the line > > > > Another way is to use the string operator: stringcolumn(3) or the > shorthand strcol(3). I should have seen that to start with. > > Thanks, I wasn't aware of this. So you would use > > plot "data.txt" u 1:(strcol($3) eq 'M' ? $2 : 1/0) > > Leo > > > -- Tradition is not the worship of ashes, but the preservation of fire. - Gustav Mahler |