From: Leo B. <l_b...@us...> - 2013-09-03 17:35:45
|
>From mailnull Tue Sep 3 16:50:17 2013 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of lists.sourceforge.net designates 172.29.29.180 as permitted sender) client-ip=172.29.29.180; envelope-from=gnu...@li...; helo=lists.sourceforge.net; Date: Tue, 3 Sep 2013 09:49:33 -0700 From: Mahmood Naderan <nt_...@ya...> Reply-To: Mahmood Naderan <nt_...@ya...> Content-Type: text/plain; charset="iso-8859-1" Thanks for the quick reply. I understood it but I receive error. Again here is the data file 100 10 M 150 20 M 30 40 H 50 90 M So I ran plot "data.txt" u 1:($3=='M':$2:1/0) It should be ($3 eq 'M' ? $2 : 1/0) except that $3 is parsed as a number, not a string, so even then you don't get what you want. So I expect that it compares the third column to 'M' and on a match return the second column. Isn't that? Now I receive None-numeric string found where a numeric expression was expected. I think plot "< awk '/M$/{print $1\" \"$2}' data.txt" u 1:2 does what you want. Leo |