-1

I have four columns of data (say x, y, z, and m). I need to interpolate values of x, y, and z for a given value of m, based upon data points in this file. This file contains a lot more data points. For instance, say at m = 9.0, I need to interpolate corresponding values of x, y, and z that will be giving me m=9.0. If you see the data points here, you can see that I have points closer to m=9.0, but not exactly m=9.0.

0.4  0   -14.49      0.523939 
0.4  0   -14.48      0.54868 
0.4  0   -14.47      0.574591 
0.4  0   -14.46      0.601726 
0.4  0   -14.45      0.630144 
0.4  0   -14.44      0.659906 
0.4  0   -14.43      0.691075 
0.4  0   -14.42      0.723717 
0.4  0   -14.41      0.757902 
0.4  0   -14.4   0.793704 
0.4  0   -14.39      0.831199 
0.4  0   -14.38      0.870467 
0.4  0   -14.37      0.911591 
0.4  0   -14.36      0.954661 
0.4  0   -14.35      0.999768 
0.4  0   -14.34      1.04701 
0.4  0   -14.33      1.09648 
0.4  0   -14.32      1.1483 
0.4  0   -14.31      1.20257 
0.4  0   -14.3   1.2594 
0.4  0   -14.29      1.31892 
0.4  0   -14.28      1.38126 
0.4  0   -14.27      1.44655 
0.4  0   -14.26      1.51494 
0.4  0   -14.25      1.58655 
0.4  0   -14.24      1.66156 
0.4  0   -14.23      1.74011 
0.4  0   -14.22      1.82239 
0.4  0   -14.21      1.90856 
0.4  0   -14.2   1.99881 
0.4  0   -14.19      2.09333 
0.4  0   -14.18      2.19233 
0.4  0   -14.17      2.29602 
0.4  0   -14.16      2.40461 
0.4  0   -14.15      2.51835 
0.4  0   -14.14      2.63748 
0.4  0   -14.13      2.76225 
0.4  0   -14.12      2.89292 
0.4  0   -14.11      3.02979 
0.4  0   -14.1   3.17315 
0.4  0   -14.09      3.32329 
0.4  0   -14.08      3.48055 
0.4  0   -14.07      3.64526 
0.4  0   -14.06      3.81777 
0.4  0   -14.05      3.99846 
0.4  0   -14.04      4.18771 
0.4  0   -14.03      4.38593 
0.4  0   -14.02      4.59354 
0.4  0   -14.01      4.811 
0.4  0   -14     5.03876 
0.4  0   -13.99      5.27732 
0.4  0   -13.98      5.52718 
0.4  0   -13.97      5.78889 
0.4  0   -13.96      6.063 
0.4  0   -13.95      6.35011 
0.4  0   -13.94      6.65082 
0.4  0   -13.93      6.9658 
0.4  0   -13.92      7.2957 
0.4  0   -13.91      7.64124 
0.4  0   -13.9   8.00317 
0.4  0   -13.89      8.38225 
0.4  0   -13.88      8.7793 
0.4  0   -13.87      9.19517 
0.4  0   -13.86      9.63075 
0.4  0   -13.85      10.087 
0.4  0   -13.84      10.5648 
0.4  0   -13.83      11.0653 
0.4  0   -13.82      11.5896 
0.4  0   -13.81      12.1386 
0.4  0   -13.8   12.7137 
0.4  0   -13.79      13.316 
0.4  0   -13.78      13.9469 
0.4  0   -13.77      14.6076 
0.4  0   -13.76      15.2996 
0.4  0   -13.75      16.0244 
0.4  0   -13.74      16.7835 
0.4  0   -13.73      17.5786 
0.4  0   -13.72      18.4113 
0.4  0   -13.71      19.2833 
0.4  0   -13.7   20.1967 
0.4  0   -13.69      21.1532 
0.4  0   -13.68      22.1549 
0.4  0   -13.67      23.204 
0.4  0   -13.66      24.3027 
0.4  0   -13.65      25.4533 
0.4  0   -13.64      26.6581 
0.4  0   -13.63      27.9199 
0.4  0   -13.62      29.2412 
0.4  0   -13.61      30.6249 
0.4  0   -13.6   32.0737 
0.4  0   -13.59      33.5908 
0.4  0   -13.58      35.1794 
0.4  0   -13.57      36.8427 
0.4  0   -13.56      38.5843 
0.4  0   -13.55      40.4078 
0.4  0   -13.54      42.3169 
0.4  0   -13.53      44.3157 
0.4  0   -13.52      46.4082 
0.4  0   -13.51      48.5989 
0.4  0   -13.5   50.8921 
0.4  0   -13.49      53.2927 
0.4  0   -13.48      55.8056 
0.4  0   -13.47      58.4358 
0.4  0   -13.46      61.1888 
0.4  0   -13.45      64.0702 
0.4  0   -13.44      67.0858 
0.4  0   -13.43      70.2417 
0.4  0   -13.42      73.5443 
0.4  0   -13.41      77.0001 
0.4  0   -13.4   80.6161 
0.4  0   -13.39      84.3996 
0.4  0   -13.38      88.3579 
0.4  0   -13.37      92.499 
0.4  0   -13.36      96.831 
0.4  0   -13.35      101.362 
0.4  0   -13.34      106.102 
0.4  0   -13.33      111.059 
0.4  0   -13.32      116.243 
0.4  0   -13.31      121.664 
0.4  0   -13.3   127.333 
0.4  0   -13.29      133.259 
0.4  0   -13.28      139.455 
0.4  0   -13.27      145.933 
0.4  0   -13.26      152.703 
0.4  0   -13.25      159.78 
0.4  0   -13.24      167.175 
0.4  0   -13.23      174.903 
0.4  0   -13.22      182.978 
0.4  0   -13.21      191.415 
0.4  0   -13.2   200.229 
0.4  0   -13.19      209.436 
0.4  0   -13.18      219.052 
0.4  0   -13.17      229.095 
0.4  0   -13.16      239.582 
0.4  0   -13.15      250.533 
0.4  0   -13.14      261.966 
0.4  0   -13.13      273.901 
0.4  0   -13.12      286.36 
0.4  0   -13.11      299.364 
0.4  0   -13.1   312.936 
0.4  0   -13.09      327.099 
0.4  0   -13.08      341.878 
0.4  0   -13.07      357.297 
0.4  0   -13.06      373.384 
0.4  0   -13.05      390.166 
0.4  0   -13.04      407.672 
0.4  0   -13.03      425.931 
0.4  0   -13.02      444.976 
0.4  0   -13.01      464.838 
0.4  0   -13     485.551 
0.4  360     -14.49      0.523939 
0.4  360     -14.48      0.54868 
0.4  360     -14.47      0.574591 
0.4  360     -14.46      0.601726 
0.4  360     -14.45      0.630144 
0.4  360     -14.44      0.659906 
0.4  360     -14.43      0.691075 
0.4  360     -14.42      0.723717 
0.4  360     -14.41      0.757902 
0.4  360     -14.4   0.793704 
0.4  360     -14.39      0.831199 
0.4  360     -14.38      0.870467 
0.4  360     -14.37      0.911591 
0.4  360     -14.36      0.954661 
0.4  360     -14.35      0.999768 
0.4  360     -14.34      1.04701 
0.4  360     -14.33      1.09648 
0.4  360     -14.32      1.1483 
0.4  360     -14.31      1.20257 
0.4  360     -14.3   1.2594 
0.4  360     -14.29      1.31892 
0.4  360     -14.28      1.38126 
0.4  360     -14.27      1.44655 
0.4  360     -14.26      1.51494 
0.4  360     -14.25      1.58655 
0.4  360     -14.24      1.66156 
0.4  360     -14.23      1.74011 
0.4  360     -14.22      1.82239 
0.4  360     -14.21      1.90856 
0.4  360     -14.2   1.99881 
0.4  360     -14.19      2.09333 
0.4  360     -14.18      2.19233 
0.4  360     -14.17      2.29602 
0.4  360     -14.16      2.40461 
0.4  360     -14.15      2.51835 
0.4  360     -14.14      2.63748 
0.4  360     -14.13      2.76225 
0.4  360     -14.12      2.89292 
0.4  360     -14.11      3.02979 
0.4  360     -14.1   3.17315 
0.4  360     -14.09      3.32329 
0.4  360     -14.08      3.48055 
0.4  360     -14.07      3.64526 
0.4  360     -14.06      3.81777 
0.4  360     -14.05      3.99846 
0.4  360     -14.04      4.18771 
0.4  360     -14.03      4.38593 
0.4  360     -14.02      4.59354 
0.4  360     -14.01      4.811 
0.4  360     -14     5.03876 
0.4  360     -13.99      5.27732 
0.4  360     -13.98      5.52718 
0.4  360     -13.97      5.78889 
0.4  360     -13.96      6.063 
0.4  360     -13.95      6.35011 
0.4  360     -13.94      6.65082 
0.4  360     -13.93      6.9658 
0.4  360     -13.92      7.2957 
0.4  360     -13.91      7.64124 
0.4  360     -13.9   8.00317 
0.4  360     -13.89      8.38225 
0.4  360     -13.88      8.7793 
0.4  360     -13.87      9.19517 
0.4  360     -13.86      9.63075 
0.4  360     -13.85      10.087 
0.4  360     -13.84      10.5648 
0.4  360     -13.83      11.0653 
0.4  360     -13.82      11.5896 
0.4  360     -13.81      12.1386 
0.4  360     -13.8   12.7137 
0.4  360     -13.79      13.316 
0.4  360     -13.78      13.9469 
0.4  360     -13.77      14.6076 
0.4  360     -13.76      15.2996 
0.4  360     -13.75      16.0244 
0.4  360     -13.74      16.7835 
0.4  360     -13.73      17.5786 
0.4  360     -13.72      18.4113 
0.4  360     -13.71      19.2833 
0.4  360     -13.7   20.1967 
0.4  360     -13.69      21.1532 
0.4  360     -13.68      22.1549 
0.4  360     -13.67      23.204 
0.4  360     -13.66      24.3027 
0.4  360     -13.65      25.4533 
0.4  360     -13.64      26.6581 
0.4  360     -13.63      27.9199 
0.4  360     -13.62      29.2412 
0.4  360     -13.61      30.6249 
0.4  360     -13.6   32.0737 
0.4  360     -13.59      33.5908 
0.4  360     -13.58      35.1794 
0.4  360     -13.57      36.8427 
0.4  360     -13.56      38.5843 
0.4  360     -13.55      40.4078 
0.4  360     -13.54      42.3169 
0.4  360     -13.53      44.3157 
0.4  360     -13.52      46.4082 
0.4  360     -13.51      48.5989 
0.4  360     -13.5   50.8921 
0.4  360     -13.49      53.2927 
0.4  360     -13.48      55.8056 
0.4  360     -13.47      58.4358 
0.4  360     -13.46      61.1888 
0.4  360     -13.45      64.0702 
0.4  360     -13.44      67.0858 
0.4  360     -13.43      70.2417 
0.4  360     -13.42      73.5443 
0.4  360     -13.41      77.0001 
0.4  360     -13.4   80.6161 
0.4  360     -13.39      84.3996 
0.4  360     -13.38      88.3579 
0.4  360     -13.37      92.499 
0.4  360     -13.36      96.831 
0.4  360     -13.35      101.362 
0.4  360     -13.34      106.102 
0.4  360     -13.33      111.059 
0.4  360     -13.32      116.243 
0.4  360     -13.31      121.664 
0.4  360     -13.3   127.333 
0.4  360     -13.29      133.259 
0.4  360     -13.28      139.455 
0.4  360     -13.27      145.933 
0.4  360     -13.26      152.703 
0.4  360     -13.25      159.78 
0.4  360     -13.24      167.175 
0.4  360     -13.23      174.903 
0.4  360     -13.22      182.978 
0.4  360     -13.21      191.415 
0.4  360     -13.2   200.229 
0.4  360     -13.19      209.436 
0.4  360     -13.18      219.052 
0.4  360     -13.17      229.095 
0.4  360     -13.16      239.582  

0.405    0   -14.49      0.502862 
0.405    0   -14.48      0.526618 
0.405    0   -14.47      0.551497 
0.405    0   -14.46      0.577553 
0.405    0   -14.45      0.604842 
0.405    0   -14.44      0.633421 
0.405    0   -14.43      0.663353 
0.405    0   -14.42      0.694701 
0.405    0   -14.41      0.727531 
0.405    0   -14.4   0.761916 
0.405    0   -14.39      0.797927 
0.405    0   -14.38      0.835643 
0.405    0   -14.37      0.875143 
0.405    0   -14.36      0.916514 
0.405    0   -14.35      0.959842 
0.405    0   -14.34      1.00522 
0.405    0   -14.33      1.05275 
0.405    0   -14.32      1.10253 
0.405    0   -14.31      1.15466 
0.405    0   -14.3   1.20927 
0.405    0   -14.29      1.26646 
0.405    0   -14.28      1.32636 
0.405    0   -14.27      1.3891 
0.405    0   -14.26      1.45481 
0.405    0   -14.25      1.52363 
0.405    0   -14.24      1.59571 
0.405    0   -14.23      1.67121 
0.405    0   -14.22      1.75029 
0.405    0   -14.21      1.83311 
0.405    0   -14.2   1.91986 
0.405    0   -14.19      2.01072 
0.405    0   -14.18      2.10589 
0.405    0   -14.17      2.20557 
0.405    0   -14.16      2.30998 
0.405    0   -14.15      2.41934 
0.405    0   -14.14      2.53389 
0.405    0   -14.13      2.65386 
0.405    0   -14.12      2.77953 
0.405    0   -14.11      2.91116 
0.405    0   -14.1   3.04904 
0.405    0   -14.09      3.19346 
0.405    0   -14.08      3.34473 
0.405    0   -14.07      3.50318 
0.405    0   -14.06      3.66914 
0.405    0   -14.05      3.84299 
0.405    0   -14.04      4.02509 
0.405    0   -14.03      4.21583 
0.405    0   -14.02      4.41563 
0.405    0   -14.01      4.62491 
0.405    0   -14     4.84414 
0.405    0   -13.99      5.07377 
0.405    0   -13.98      5.3143 
0.405    0   -13.97      5.56627 
0.405    0   -13.96      5.83019 
0.405    0   -13.95      6.10666 
0.405    0   -13.94      6.39626 
0.405    0   -13.93      6.69961 
0.405    0   -13.92      7.01738 
0.405    0   -13.91      7.35025 
0.405    0   -13.9   7.69893 
0.405    0   -13.89      8.06418 
0.405    0   -13.88      8.44678 
0.405    0   -13.87      8.84756 
0.405    0   -13.86      9.26739 
0.405    0   -13.85      9.70717 
0.405    0   -13.84      10.1678 
0.405    0   -13.83      10.6504 
0.405    0   -13.82      11.1559 
0.405    0   -13.81      11.6854 
0.405    0   -13.8   12.2401 
0.405    0   -13.79      12.8212 
0.405    0   -13.78      13.4298 
0.405    0   -13.77      14.0674 
0.405    0   -13.76      14.7352 
0.405    0   -13.75      15.4348 
0.405    0   -13.74      16.1676 
0.405    0   -13.73      16.9352 
0.405    0   -13.72      17.7393 
0.405    0   -13.71      18.5815 
0.405    0   -13.7   19.4638 
0.405    0   -13.69      20.3879 
0.405    0   -13.68      21.3558 
0.405    0   -13.67      22.3697 
0.405    0   -13.66      23.4317 
0.405    0   -13.65      24.5441 
0.405    0   -13.64      25.7092 
0.405    0   -13.63      26.9296 
0.405    0   -13.62      28.2077 
0.405    0   -13.61      29.5465 
0.405    0   -13.6   30.9486 
0.405    0   -13.59      32.4171 
0.405    0   -13.58      33.9551 
0.405    0   -13.57      35.5658 
0.405    0   -13.56      37.2527 
0.405    0   -13.55      39.0192 
0.405    0   -13.54      40.8693 
0.405    0   -13.53      42.8066 
0.405    0   -13.52      44.8354 
0.405    0   -13.51      46.9598 
0.405    0   -13.5   49.1842 
0.405    0   -13.49      51.5135 
0.405    0   -13.48      53.9523 
0.405    0   -13.47      56.5057 
0.405    0   -13.46      59.1792 
0.405    0   -13.45      61.978 
0.405    0   -13.44      64.9082 
0.405    0   -13.43      67.9756 
0.405    0   -13.42      71.1866 
0.405    0   -13.41      74.5477 
0.405    0   -13.4   78.0658 
0.405    0   -13.39      81.748 
0.405    0   -13.38      85.6018 
0.405    0   -13.37      89.635 
0.405    0   -13.36      93.8557 
0.405    0   -13.35      98.2724 
0.405    0   -13.34      102.894 
0.405    0   -13.33      107.729 
0.405    0   -13.32      112.788 
0.405    0   -13.31      118.08 
0.405    0   -13.3   123.617 
0.405    0   -13.29      129.408 
0.405    0   -13.28      135.465 
0.405    0   -13.27      141.8 
0.405    0   -13.26      148.425 
0.405    0   -13.25      155.353 
0.405    0   -13.24      162.598 
0.405    0   -13.23      170.172 
0.405    0   -13.22      178.09 
0.405    0   -13.21      186.368 
0.405    0   -13.2   195.02 
0.405    0   -13.19      204.064 
0.405    0   -13.18      213.516 
0.405    0   -13.17      223.394 
0.405    0   -13.16      233.716 
0.405    0   -13.15      244.501 
0.405    0   -13.14      255.768 
0.405    0   -13.13      267.54 
0.405    0   -13.12      279.837 
0.405    0   -13.11      292.681 
0.405    0   -13.1   306.097 
0.405    0   -13.09      320.108 
0.405    0   -13.08      334.74 
0.405    0   -13.07      350.02 
0.405    0   -13.06      365.975 
0.405    0   -13.05      382.634 
0.405    0   -13.04      400.028 
0.405    0   -13.03      418.187 
0.405    0   -13.02      437.145 
0.405    0   -13.01      456.936 
0.405    0   -13     477.5
0.405    360     -14.49      0.502862 
0.405    360     -14.48      0.526618 
0.405    360     -14.47      0.551497 
0.405    360     -14.46      0.577553 
0.405    360     -14.45      0.604842 
0.405    360     -14.44      0.633421 
0.405    360     -14.43      0.663353 
0.405    360     -14.42      0.694701 
0.405    360     -14.41      0.727531 
0.405    360     -14.4   0.761916 
0.405    360     -14.39      0.797927 
0.405    360     -14.38      0.835643 
0.405    360     -14.37      0.875143 
0.405    360     -14.36      0.916514 
0.405    360     -14.35      0.959842 
0.405    360     -14.34      1.00522 
0.405    360     -14.33      1.05275 
0.405    360     -14.32      1.10253 
0.405    360     -14.31      1.15466 
0.405    360     -14.3   1.20927 
0.405    360     -14.29      1.26646 
0.405    360     -14.28      1.32636 
0.405    360     -14.27      1.3891 
0.405    360     -14.26      1.45481 
0.405    360     -14.25      1.52363 
0.405    360     -14.24      1.59571 
0.405    360     -14.23      1.67121 
0.405    360     -14.22      1.75029 
0.405    360     -14.21      1.83311 
0.405    360     -14.2   1.91986 
0.405    360     -14.19      2.01072 
0.405    360     -14.18      2.10589 
0.405    360     -14.17      2.20557 
0.405    360     -14.16      2.30998 
0.405    360     -14.15      2.41934 
0.405    360     -14.14      2.53389 
0.405    360     -14.13      2.65386 
0.405    360     -14.12      2.77953 
0.405    360     -14.11      2.91116 
0.405    360     -14.1   3.04904 
0.405    360     -14.09      3.19346 
0.405    360     -14.08      3.34473 
0.405    360     -14.07      3.50318 
0.405    360     -14.06      3.66914 
0.405    360     -14.05      3.84299 
0.405    360     -14.04      4.02509 
0.405    360     -14.03      4.21583 
0.405    360     -14.02      4.41563 
0.405    360     -14.01      4.62491 
0.405    360     -14     4.84414 
0.405    360     -13.99      5.07377 
0.405    360     -13.98      5.3143 
0.405    360     -13.97      5.56627 
0.405    360     -13.96      5.83019 
0.405    360     -13.95      6.10666 
0.405    360     -13.94      6.39626 
0.405    360     -13.93      6.69961 
0.405    360     -13.92      7.01738 
0.405    360     -13.91      7.35025 
0.405    360     -13.9   7.69893 
0.405    360     -13.89      8.06418 
0.405    360     -13.88      8.44678 
0.405    360     -13.87      8.84756 
0.405    360     -13.86      9.26739 
0.405    360     -13.85      9.70717 
0.405    360     -13.84      10.1678 
0.405    360     -13.83      10.6504 
0.405    360     -13.82      11.1559 
0.405    360     -13.81      11.6854 
0.405    360     -13.8   12.2401 
0.405    360     -13.79      12.8212 
0.405    360     -13.78      13.4298 
0.405    360     -13.77      14.0674 
0.405    360     -13.76      14.7352 
0.405    360     -13.75      15.4348 
0.405    360     -13.74      16.1676 
0.405    360     -13.73      16.9352 
0.405    360     -13.72      17.7393 
0.405    360     -13.71      18.5815 
0.405    360     -13.7   19.4638 
0.405    360     -13.69      20.3879 
0.405    360     -13.68      21.3558 
0.405    360     -13.67      22.3697 
0.405    360     -13.66      23.4317 
0.405    360     -13.65      24.5441 
0.405    360     -13.64      25.7092 
0.405    360     -13.63      26.9296 
0.405    360     -13.62      28.2077 
0.405    360     -13.61      29.5465 
0.405    360     -13.6   30.9486 
0.405    360     -13.59      32.4171 
0.405    360     -13.58      33.9551 
0.405    360     -13.57      35.5658 
0.405    360     -13.56      37.2527 
0.405    360     -13.55      39.0192 
0.405    360     -13.54      40.8693 
0.405    360     -13.53      42.8066 
0.405    360     -13.52      44.8354 
0.405    360     -13.51      46.9598 
0.405    360     -13.5   49.1842 
0.405    360     -13.49      51.5135 
0.405    360     -13.48      53.9523 
0.405    360     -13.47      56.5057 
0.405    360     -13.46      59.1792 
0.405    360     -13.45      61.978 
0.405    360     -13.44      64.9082 
0.405    360     -13.43      67.9756 
0.405    360     -13.42      71.1866 
0.405    360     -13.41      74.5477 
0.405    360     -13.4   78.0658 
0.405    360     -13.39      81.748 
0.405    360     -13.38      85.6018 
0.405    360     -13.37      89.635 
0.405    360     -13.36      93.8557 
0.405    360     -13.35      98.2724 
0.405    360     -13.34      102.894 
0.405    360     -13.33      107.729 
0.405    360     -13.32      112.788 
0.405    360     -13.31      118.08 
0.405    360     -13.3   123.617 
0.405    360     -13.29      129.408 
0.405    360     -13.28      135.465 
0.405    360     -13.27      141.8 
0.405    360     -13.26      148.425 
0.405    360     -13.25      155.353 
0.405    360     -13.24      162.598 
0.405    360     -13.23      170.172 
0.405    360     -13.22      178.09 
0.405    360     -13.21      186.368 
0.405    360     -13.2   195.02 
0.405    360     -13.19      204.064 
0.405    360     -13.18      213.516 
0.405    360     -13.17      223.394 
0.405    360     -13.16      233.716 
 
0.41     0   -14.49      0.480608 
0.41     0   -14.48      0.503323 
0.41     0   -14.47      0.527113 
0.41     0   -14.46      0.552029 
0.41     0   -14.45      0.578124 
0.41     0   -14.44      0.605454 
0.41     0   -14.43      0.634079 
0.41     0   -14.42      0.664059 
0.41     0   -14.41      0.695458 
0.41     0   -14.4   0.728345 
0.41     0   -14.39      0.762788 
0.41     0   -14.38      0.798864 
0.41     0   -14.37      0.836648 
0.41     0   -14.36      0.876222 
0.41     0   -14.35      0.917671 
0.41     0   -14.34      0.961084 
0.41     0   -14.33      1.00655 
0.41     0   -14.32      1.05418 
0.41     0   -14.31      1.10406 
0.41     0   -14.3   1.15631 
0.41     0   -14.29      1.21104 
0.41     0   -14.28      1.26835 
0.41     0   -14.27      1.32839 
0.41     0   -14.26      1.39128 
0.41     0   -14.25      1.45714 
0.41     0   -14.24      1.52614 
0.41     0   -14.23      1.5984 
0.41     0   -14.22      1.67409 
0.41     0   -14.21      1.75338 
0.41     0   -14.2   1.83643 
0.41     0   -14.19      1.92342 
0.41     0   -14.18      2.01454 
0.41     0   -14.17      2.10998 
0.41     0   -14.16      2.20996 
0.41     0   -14.15      2.31469 
0.41     0   -14.14      2.42439 
0.41     0   -14.13      2.5393 
0.41     0   -14.12      2.65966 
0.41     0   -14.11      2.78575 
0.41     0   -14.1   2.91783 
0.41     0   -14.09      3.05619 
0.41     0   -14.08      3.20112 
0.41     0   -14.07      3.35294 
0.41     0   -14.06      3.51198 
0.41     0   -14.05      3.67858 
0.41     0   -14.04      3.85311 
0.41     0   -14.03      4.03593 
0.41     0   -14.02      4.22746 
0.41     0   -14.01      4.42809 
0.41     0   -14     4.63827 
0.41     0   -13.99      4.85845 
0.41     0   -13.98      5.08911 
0.41     0   -13.97      5.33074 
0.41     0   -13.96      5.58388 
0.41     0   -13.95      5.84908 
0.41     0   -13.94      6.12689 
0.41     0   -13.93      6.41794 
0.41     0   -13.92      6.72285 
0.41     0   -13.91      7.04228 
0.41     0   -13.9   7.37692 
0.41     0   -13.89      7.72751 
0.41     0   -13.88      8.0948 
0.41     0   -13.87      8.47959 
0.41     0   -13.86      8.88271 
0.41     0   -13.85      9.30505 
0.41     0   -13.84      9.74751 
0.41     0   -13.83      10.2111 
0.41     0   -13.82      10.6967 
0.41     0   -13.81      11.2055 
0.41     0   -13.8   11.7386 
0.41     0   -13.79      12.297 
0.41     0   -13.78      12.8821 
0.41     0   -13.77      13.4951 
0.41     0   -13.76      14.1373 
0.41     0   -13.75      14.8101 
0.41     0   -13.74      15.515 
0.41     0   -13.73      16.2535 
0.41     0   -13.72      17.0272 
0.41     0   -13.71      17.8378 
0.41     0   -13.7   18.687 
0.41     0   -13.69      19.5767 
0.41     0   -13.68      20.5088 
0.41     0   -13.67      21.4854 
0.41     0   -13.66      22.5084 
0.41     0   -13.65      23.5802 
0.41     0   -13.64      24.7031 
0.41     0   -13.63      25.8794 
0.41     0   -13.62      27.1118 
0.41     0   -13.61      28.4028 
0.41     0   -13.6   29.7553 
0.41     0   -13.59      31.1722 
0.41     0   -13.58      32.6564 
0.41     0   -13.57      34.2112 
0.41     0   -13.56      35.84 
0.41     0   -13.55      37.5462 
0.41     0   -13.54      39.3334 
0.41     0   -13.53      41.2055 
0.41     0   -13.52      43.1665 
0.41     0   -13.51      45.2205 
0.41     0   -13.5   47.3719 
0.41     0   -13.49      49.6254 
0.41     0   -13.48      51.9855 
0.41     0   -13.47      54.4574 
0.41     0   -13.46      57.0463 
0.41     0   -13.45      59.7576 
0.41     0   -13.44      62.597 
0.41     0   -13.43      65.5705 
0.41     0   -13.42      68.6842 
0.41     0   -13.41      71.9448 
0.41     0   -13.4   75.3589 
0.41     0   -13.39      78.9337 
0.41     0   -13.38      82.6767 
0.41     0   -13.37      86.5954 
0.41     0   -13.36      90.698 
0.41     0   -13.35      94.993 
0.41     0   -13.34      99.489 
0.41     0   -13.33      104.195 
0.41     0   -13.32      109.122 
0.41     0   -13.31      114.278 
0.41     0   -13.3   119.674 
0.41     0   -13.29      125.322 
0.41     0   -13.28      131.233 
0.41     0   -13.27      137.417 
0.41     0   -13.26      143.889 
0.41     0   -13.25      150.66 
0.41     0   -13.24      157.744 
0.41     0   -13.23      165.156 
0.41     0   -13.22      172.909 
0.41     0   -13.21      181.019 
0.41     0   -13.2   189.502 
0.41     0   -13.19      198.375 
0.41     0   -13.18      207.654 
0.41     0   -13.17      217.358 
0.41     0   -13.16      227.506 
0.41     0   -13.15      238.117 
0.41     0   -13.14      249.212 
0.41     0   -13.13      260.812 
0.41     0   -13.12      272.939 
0.41     0   -13.11      285.617 
0.41     0   -13.1   298.871 
0.41     0   -13.09      312.724 
0.41     0   -13.08      327.204 
0.41     0   -13.07      342.34 
0.41     0   -13.06      358.158 
0.41     0   -13.05      374.691 
0.41     0   -13.04      391.969 
0.41     0   -13.03      410.025 
0.41     0   -13.02      428.895 
0.41     0   -13.01      448.614 
0.41     0   -13     469.22 
0.41     360     -14.49      0.480608 
0.41     360     -14.48      0.503323 
0.41     360     -14.47      0.527113 
0.41     360     -14.46      0.552029 
0.41     360     -14.45      0.578124 
0.41     360     -14.44      0.605454 
0.41     360     -14.43      0.634079 
0.41     360     -14.42      0.664059 
0.41     360     -14.41      0.695458 
0.41     360     -14.4   0.728345 
0.41     360     -14.39      0.762788 
0.41     360     -14.38      0.798864 
0.41     360     -14.37      0.836648 
0.41     360     -14.36      0.876222 
0.41     360     -14.35      0.917671 
0.41     360     -14.34      0.961084 
0.41     360     -14.33      1.00655 
0.41     360     -14.32      1.05418 
0.41     360     -14.31      1.10406 
0.41     360     -14.3   1.15631 
0.41     360     -14.29      1.21104 
0.41     360     -14.28      1.26835 
0.41     360     -14.27      1.32839 
0.41     360     -14.26      1.39128 
0.41     360     -14.25      1.45714 
0.41     360     -14.24      1.52614 
0.41     360     -14.23      1.5984 
0.41     360     -14.22      1.67409 
0.41     360     -14.21      1.75338 
0.41     360     -14.2   1.83643 
0.41     360     -14.19      1.92342 
0.41     360     -14.18      2.01454 
0.41     360     -14.17      2.10998 
0.41     360     -14.16      2.20996 
0.41     360     -14.15      2.31469 
0.41     360     -14.14      2.42439 
0.41     360     -14.13      2.5393 
0.41     360     -14.12      2.65966 
0.41     360     -14.11      2.78575 
0.41     360     -14.1   2.91783 
0.41     360     -14.09      3.05619 
0.41     360     -14.08      3.20112 
0.41     360     -14.07      3.35294 
0.41     360     -14.06      3.51198 
0.41     360     -14.05      3.67858 
0.41     360     -14.04      3.85311 
0.41     360     -14.03      4.03593 
0.41     360     -14.02      4.22746 
0.41     360     -14.01      4.42809 
0.41     360     -14     4.63827 
0.41     360     -13.99      4.85845 
0.41     360     -13.98      5.08911 
0.41     360     -13.97      5.33074 
0.41     360     -13.96      5.58388 
0.41     360     -13.95      5.84908 
0.41     360     -13.94      6.12689 
0.41     360     -13.93      6.41794 
0.41     360     -13.92      6.72285 
0.41     360     -13.91      7.04228 
0.41     360     -13.9   7.37692 
0.41     360     -13.89      7.72751 
0.41     360     -13.88      8.0948 
0.41     360     -13.87      8.47959 
0.41     360     -13.86      8.88271 
0.41     360     -13.85      9.30505 
0.41     360     -13.84      9.74751 
0.41     360     -13.83      10.2111 
0.41     360     -13.82      10.6967 
0.41     360     -13.81      11.2055 
0.41     360     -13.8   11.7386 
0.41     360     -13.79      12.297 
0.41     360     -13.78      12.8821 
0.41     360     -13.77      13.4951 
0.41     360     -13.76      14.1373 
0.41     360     -13.75      14.8101 
0.41     360     -13.74      15.515 
0.41     360     -13.73      16.2535 
0.41     360     -13.72      17.0272 
0.41     360     -13.71      17.8378 
0.41     360     -13.7   18.687 
0.41     360     -13.69      19.5767 
0.41     360     -13.68      20.5088 
0.41     360     -13.67      21.4854 
0.41     360     -13.66      22.5084 
0.41     360     -13.65      23.5802 
0.41     360     -13.64      24.7031 
0.41     360     -13.63      25.8794 
0.41     360     -13.62      27.1118 
0.41     360     -13.61      28.4028 
0.41     360     -13.6   29.7553 
0.41     360     -13.59      31.1722 
0.41     360     -13.58      32.6564 
0.41     360     -13.57      34.2112 
0.41     360     -13.56      35.84 
0.41     360     -13.55      37.5462 
0.41     360     -13.54      39.3334 
0.41     360     -13.53      41.2055 
0.41     360     -13.52      43.1665 
0.41     360     -13.51      45.2205 
0.41     360     -13.5   47.3719 
0.41     360     -13.49      49.6254 
0.41     360     -13.48      51.9855 
0.41     360     -13.47      54.4574 
0.41     360     -13.46      57.0463 
0.41     360     -13.45      59.7576 
0.41     360     -13.44      62.597 
0.41     360     -13.43      65.5705 
0.41     360     -13.42      68.6842 
0.41     360     -13.41      71.9448 
0.41     360     -13.4   75.3589 
0.41     360     -13.39      78.9337 
0.41     360     -13.38      82.6767 
0.41     360     -13.37      86.5954 
0.41     360     -13.36      90.698 
0.41     360     -13.35      94.993 
0.41     360     -13.34      99.489 
0.41     360     -13.33      104.195 
0.41     360     -13.32      109.122 
0.41     360     -13.31      114.278 
0.41     360     -13.3   119.674 
0.41     360     -13.29      125.322 
0.41     360     -13.28      131.233 
0.41     360     -13.27      137.417 
0.41     360     -13.26      143.889 
0.41     360     -13.25      150.66 
0.41     360     -13.24      157.744 
0.41     360     -13.23      165.156 
0.41     360     -13.22      172.909 
0.41     360     -13.21      181.019 
0.41     360     -13.2   189.502 
0.41     360     -13.19      198.375 
0.41     360     -13.18      207.654 
0.41     360     -13.17      217.358 
0.41     360     -13.16      227.506 
  • It's not fully clear to me. What is `m`? Do you want a "3D" xyz-plot where the color is determined by the value of `m`? – theozh Feb 11 '22 at 09:04
  • @theozh not exactly. For example,let say I need value of m = 9.0, then there will be a number of combinations of x, y, and z which can give me m=9.0. I need to plot those values of x,y,z. Where since z is a range of values so maybe i can display it with colour gradient. – Masoom Singh Feb 11 '22 at 09:11
  • so, you want to filter values and plot xyz only if `m=9.0`? However, if I look at your example data there seems to be no value `m=9.0`, so maybe you want to filter in a certain range, e.g. `9.0<=m<=10.0`? – theozh Feb 11 '22 at 09:25
  • I simply gave a very small data set. I have millions of point with me, in which I do have m=9.0. However, the value of m could be anything but a specific value and not a range. I simply wanted to ask that I could have interpolated in between values if I had three columns in gnuplot. Is that possible somehow with four columns too? – Masoom Singh Feb 11 '22 at 10:17
  • So you just want to use those points, for which m=9.0, and "throw away" all other ones? This can be done with a logical test inside using, e.g. like `plot 'mydata' using ($4==9.0 ? $1 : NaN):2:3`. However, I don't understand what you mean with interpolation and three columns… – Eldrad Feb 11 '22 at 10:28
  • By inerpolation, I meant that even if I don't have m=9.0, I do have upper and lower values. So I could interpolate the corresponding x and y values . So I could use the function of drawing contours in Gnuplot (which in this case would have been drawing a contour at 9.0). But this was possible only with three columns. – Masoom Singh Feb 11 '22 at 12:07
  • @Eldrad the above suggestion does not solve the issue. – Masoom Singh Feb 11 '22 at 12:44
  • @MasoomSingh I am sorry, I still have trouble in understanding your goal. Maybe you could add some pseudo-code to your question, where you explain in detail, how you want to use the columns? Feel free to be very verbose! – Eldrad Feb 11 '22 at 12:56
  • @MasoomSingh it's also still not clear for me. Providing your millions of datapoints is probably difficult, but could you maybe add an graph (`splot ... w pm3d`) of your points, to get an idea? Or could you create a miniaturized "complete" dataset to visualize? Are `z` and `m` somehow related or independent? What are x,y,z and m? Coordinates, temperature, time, derivatives, etc. ... ? Maybe this also helps to clarify?! Or could you maybe add a hand-sketch to illustrate what you are looking for? – theozh Feb 11 '22 at 15:49
  • https://www.dropbox.com/s/w603iphu6z72e8g/pdifffm90.pdf?dl=0 – Masoom Singh Feb 14 '22 at 05:00
  • Above is the link to a figure which I could draw with three columns. x, y, and z. where the color gradient shows varying values in z. But now I have 4 columns. Of these 4 columns. I need to sort out x,y, and z values corresponding to a particular value of m. If that value of m is not there then it should interpolate the corresponding values of x, y, and z. and then I need to draw a plot somewhat similar to the one i shared. – Masoom Singh Feb 14 '22 at 05:02
  • @theozh did my clarification help any further? Is their any way to do this in gnuplot? – Masoom Singh Feb 15 '22 at 08:19
  • @MasoomSingh No, I'm sorry. Image and explanation did not help. Most probably you can do it in gnuplot, however, I still don't know *what exactly* you want to do. I will nevertheless write an answer with a minimal example. Maybe we can get a step further with this? Furthermore, maybe you can discuss your request with one of your colleagues, and try to formulate it in different words and edit the question accordingly. – theozh Feb 15 '22 at 10:28
  • @MasoomSingh Maybe it helps if you try to reduce your question to one specific point, where you need assistance? Currently I am confused whether you need help with surfaces, contours, pm3d, filtering data, or interpolation of data or whatnot. Plotting a graph without code and asking for "something similar to that" is too broad… – Eldrad Feb 15 '22 at 16:55
  • @theozh how are you filtering the data? I mean the data set which you used for plotting. Is it interpolated? I somewhat want to do along what you have done, but my 'm' column will only have one value. Then plot corresponding x,y,and z just like you have done, with change in color showing variation in z – Masoom Singh Feb 17 '22 at 04:28
  • @Eldrad I first need to interpolate my x,y, and z for a given value of m, say m=9.0. Then use x,y,z for surface plotting in which color gradient will represent changing values of z. – Masoom Singh Feb 17 '22 at 04:30
  • @MasoomSingh It seems you are asking for many things at once, you might be better off at doing one step after another (and possibly asking separate questions). If I understood you correctly, in your huge data set there will be hundreds or even thousands of data points with m=9.0, right? So your surface will just consist of these points? Are the data points on a uniform x-y-grid or arbitrarily scattered? If they are uniform, no actual interpolation is needed; otherwise this becomes a question more about data processing and less about plotting. – Eldrad Feb 17 '22 at 08:22
  • @Eldrad in my huge data set I will have certain x,y,and z which corresponds to m=9.2 and certain data set of x,y,and z which might correspond to say m=8.8, However, I only want x,y, and z that corresponds to m=9.0. So, I would have to interpolate possible x,y,and z values using my data file as input which gives m=9.0. Does that clear atleast the issue of why I need interpolation? – Masoom Singh Feb 17 '22 at 09:13
  • @MasoomSingh So you do NOT have points at exactly m=9.0, but they are scattered around this value… I think I understand better what you mean with interpolation. What you are asking for here is some serious data processing (or even data creation), which gnuplot isn't suited for. My guess is that you need to preprocess your data outside of gnuplot (Python, GNU Octave, Matlab, Excel, whatever), save it and then use gnuplot solely for plotting. Anyway, I don't think that this question is answerable... – Eldrad Feb 17 '22 at 19:47
  • @Eldrad ahh.. okay! I thought just like I could use cntrparam with cubicspline or bspline or something along the line.... with three columns, something could have been done. Okay thanks! – Masoom Singh Feb 18 '22 at 03:26

1 Answers1

0

@MasoomSingh, it seems to be difficult to guess what you are actually looking for. It's still not clear to me. Here is an attempt of a minimal example to narrow it down and find out.

As Eldrad already mentioned, you can filter data by setting the plotting value to NaN if certain conditions are met or not. In the example below, only plot x,y,z if m==9.0 or m==0.1.

Code:

### filter data
reset session

$Data <<EOD
# x   y     z    m
0.0   0.0   11   0.1
0.0   0.0   51   9.0
0.0   0.5   12   0.1
0.0   0.5   52   9.0
0.0   1.0   13   0.1
0.0   1.0   53   9.0

0.5   0.0   31   0.1
0.5   0.0   41   9.0
0.5   0.5   32   0.1
0.5   0.5   42   9.0
0.5   1.0   33   0.1
0.5   1.0   43   9.0

1.0   0.0   51   0.1
1.0   0.0   31   9.0
1.0   0.5   52   0.1
1.0   0.5   32   9.0
1.0   1.0   53   0.1
1.0   1.0   33   9.0
EOD

set size square
set datafile missing NaN
set key out right noautotitle
set xtics 0.5
set ytics 0.5
set view map

set multiplot layout 3,1
    plot $Data u 1:2:3 w image                    ti "unfiltered"
    plot $Data u 1:2:($4==9.0 ? $3 : NaN) w image ti "filtered by m=9.0"
    plot $Data u 1:2:($4==0.1 ? $3 : NaN) w image ti "filtered by m=0.1"
unset multiplot
### end of code

Result:

enter image description here

theozh
  • 22,244
  • 5
  • 28
  • 72
  • understanding what the code is doing it should have worked, but it shows "x range is invalid". – Masoom Singh Feb 16 '22 at 05:49
  • I have added the code for generating the linked figure. I believe in this problem -first I need to interpolate corresponding x,y, and z values for m=9.0. This will give me a set of x,y, and z values. Next I need to plot these x,y,and z as heat map, where the colour gradient will give me values corresponding to z. – Masoom Singh Feb 16 '22 at 06:04
  • could you please tell me how did you filter the data? Did you interpolate? – Masoom Singh Feb 17 '22 at 04:27
  • @MasoomSingh `($4==9.0 ? $3 : NaN)` does the following: if the value of the 4th column is equal 9.0 it will return the value of the 3rd column and `NaN` otherwise. Check `help ternary`. With this I simply skip some data points. `set datafile missing NaN` is required for this. I don't understand what you mean with interpolation. – theozh Feb 17 '22 at 08:27
  • okay, yes I understood that it will filter only values of x,y,and z where m=9.0. But I need interpolation because there might be other x,y,and z values that might be corresponding to m=9.0, but I don't have them in my data set explicitly. Just like what cntrparam function does if I set it to a discrete value in gnuplot. – Masoom Singh Feb 17 '22 at 09:19