Reading variable with double float precision from a text file with gnuplot

Posted by user3636322 on Stack Overflow See other posts from Stack Overflow or by user3636322
Published on 2014-06-04T15:22:34Z Indexed on 2014/06/04 15:24 UTC
Read the original article Hit count: 155

Filed under:

I have a text file, containing data in 3 columns like below:

0.0100000000 | 0.0058077299 | -0.0000000288

0.0110000000 | 0.0075128707 | -0.0000000373

0.0120000000 | 0.0093579693 | -0.0000000465

I want to get the variables from this file in gnuplot and use them to draw graphs:

What I exactly do is like below (e.g: to pick the variable from row 2 column 3):

ii= 2

a_0 = system("awk '{ if (NR == " . ii . ") printf \"%f\", $3}' " .datafile)

a_0 = a_0+0.

but what is written as a_0 is zero!

How can I increase the precision to get the exact value?

© Stack Overflow or respective owner

Related posts about gnuplot