sreekar guddeti wrote:
> sorry for posting the wrong data. the problem was with
>
> plot "< awk '{if (($2 == 26) && ($3 == 160)) printf("%.2f %.8f* \n *",$1,$6
> *
> 4/exp(log($1)*3))}' < coordinates.dat " using 1:2 wi li title "26"
That makes it even more obvious that the problem is with the quotes, and
explains why you didn't have a problem using the same awk command in the
shell: the outer pair of quotes doesn't appear in the shell command, and
thus the problem with nested quotes doesn't apply. The backslash it's
complaining about is the one of the \n you've now put back in, and it
gets complained about because to gnuplot's command-line parser, it
appears outside any string. Which it shouldn't.
You have to quote the inner "double quotes", and the backslash:
plot "< awk '{if (($2 == 26) && ($3 == 160)) printf(\"%.2f %.8f\\n\",
$1,$6*4/exp(log($1)*3))}' coordinates.dat " using 1:2 wi li title "26"
[all on a single line]
OTOH, I would suggest to drop awk and instead do it all in gnuplot:
plot 'coordinates.dat' u (($2==26)&&($3==160)?$1:0/0):($6*4/($1**3))
|