I cant splot with , pm3d map, my data file? Gnuplot











up vote
0
down vote

favorite












I have a data file, (.tab with 11 columns and ~30000 lines ) and when I go on gnuplot, I write :



set pm3d map
splot "merged.tab" u x:y:z


and says:



Warning: Single isoline (scan) is not enough for a pm3d plot.
Hint: Missing blank lines in the data file? See 'help pm3d' and FAQ.


on other files, it works, but I don't know why it doesn't work on this one.



Do I have to edit the files to get the columns I want? But I cant really do that through .tab files?



Any help is appreciated.










share|improve this question
























  • What exactly do you mean by a ".tab" file? are you referring to a file in the MapInfo TAB format, or just a tab-delimited text file? What "other files" have you tried that work (other .tab files, or other files in general)?
    – steeldriver
    Apr 6 '17 at 0:02










  • Yeah, MapInfo tab format, excactly, and have tried other .tab files, that worked. Dunno why this won't work :( @steeldriver
    – Billy Matlock
    Apr 6 '17 at 6:09

















up vote
0
down vote

favorite












I have a data file, (.tab with 11 columns and ~30000 lines ) and when I go on gnuplot, I write :



set pm3d map
splot "merged.tab" u x:y:z


and says:



Warning: Single isoline (scan) is not enough for a pm3d plot.
Hint: Missing blank lines in the data file? See 'help pm3d' and FAQ.


on other files, it works, but I don't know why it doesn't work on this one.



Do I have to edit the files to get the columns I want? But I cant really do that through .tab files?



Any help is appreciated.










share|improve this question
























  • What exactly do you mean by a ".tab" file? are you referring to a file in the MapInfo TAB format, or just a tab-delimited text file? What "other files" have you tried that work (other .tab files, or other files in general)?
    – steeldriver
    Apr 6 '17 at 0:02










  • Yeah, MapInfo tab format, excactly, and have tried other .tab files, that worked. Dunno why this won't work :( @steeldriver
    – Billy Matlock
    Apr 6 '17 at 6:09















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a data file, (.tab with 11 columns and ~30000 lines ) and when I go on gnuplot, I write :



set pm3d map
splot "merged.tab" u x:y:z


and says:



Warning: Single isoline (scan) is not enough for a pm3d plot.
Hint: Missing blank lines in the data file? See 'help pm3d' and FAQ.


on other files, it works, but I don't know why it doesn't work on this one.



Do I have to edit the files to get the columns I want? But I cant really do that through .tab files?



Any help is appreciated.










share|improve this question















I have a data file, (.tab with 11 columns and ~30000 lines ) and when I go on gnuplot, I write :



set pm3d map
splot "merged.tab" u x:y:z


and says:



Warning: Single isoline (scan) is not enough for a pm3d plot.
Hint: Missing blank lines in the data file? See 'help pm3d' and FAQ.


on other files, it works, but I don't know why it doesn't work on this one.



Do I have to edit the files to get the columns I want? But I cant really do that through .tab files?



Any help is appreciated.







editing gnuplot






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 11 at 18:44









Kulfy

2,83331035




2,83331035










asked Apr 5 '17 at 16:08









Billy Matlock

306




306












  • What exactly do you mean by a ".tab" file? are you referring to a file in the MapInfo TAB format, or just a tab-delimited text file? What "other files" have you tried that work (other .tab files, or other files in general)?
    – steeldriver
    Apr 6 '17 at 0:02










  • Yeah, MapInfo tab format, excactly, and have tried other .tab files, that worked. Dunno why this won't work :( @steeldriver
    – Billy Matlock
    Apr 6 '17 at 6:09




















  • What exactly do you mean by a ".tab" file? are you referring to a file in the MapInfo TAB format, or just a tab-delimited text file? What "other files" have you tried that work (other .tab files, or other files in general)?
    – steeldriver
    Apr 6 '17 at 0:02










  • Yeah, MapInfo tab format, excactly, and have tried other .tab files, that worked. Dunno why this won't work :( @steeldriver
    – Billy Matlock
    Apr 6 '17 at 6:09


















What exactly do you mean by a ".tab" file? are you referring to a file in the MapInfo TAB format, or just a tab-delimited text file? What "other files" have you tried that work (other .tab files, or other files in general)?
– steeldriver
Apr 6 '17 at 0:02




What exactly do you mean by a ".tab" file? are you referring to a file in the MapInfo TAB format, or just a tab-delimited text file? What "other files" have you tried that work (other .tab files, or other files in general)?
– steeldriver
Apr 6 '17 at 0:02












Yeah, MapInfo tab format, excactly, and have tried other .tab files, that worked. Dunno why this won't work :( @steeldriver
– Billy Matlock
Apr 6 '17 at 6:09






Yeah, MapInfo tab format, excactly, and have tried other .tab files, that worked. Dunno why this won't work :( @steeldriver
– Billy Matlock
Apr 6 '17 at 6:09












2 Answers
2






active

oldest

votes

















up vote
1
down vote













Your datafile must have the appropriate grid format (xyz or matrix -> these two links should clarify [1], [2]). Following the xyz format your x column must be arranged in a way that there is a blank line between every change in x-value.



For example a xyz grid format is:



# X   Y    Z
0 0 0
0 1 1
0 2 4
0 3 9
0 4 16
0 5 25

1 0 1
1 1 2
1 2 5
1 3 10
1 4 17
1 5 26
... ... ...


The reason for this grid format is that you aim to plot a 2D projection of contour-isolines since you use pm3d map.



However, notice that if your datafile contains data e.g. as a result of a function, this doesn't mean necessarily that they have a grid format and you have to find a programming way in order to give them this format. Maybe this TAB format, that i am unaware of, has data in "grid" format and needs just the sorting of x column and the addition of blank lines.






share|improve this answer




























    up vote
    0
    down vote













    copy paste answer from http://www.gnuplot.info/faq/faq.html#x1-320003.9




    3.9 Pm3d splot from a datafile does not draw anything



    You do set pm3d; splot ’a.dat’ and no plot but colorbox appears. Perhaps there is no blank line in between two subsequent scans (isolines) in the data file? Add blank lines! If you are curious what this means, then don’t hesitate to look to files like demo/glass.dat or demo/triangle.dat in the gnuplot demo directory.



    You can find useful the following awk script (call it e.g. addblanks.awk) which adds blank lines to a data file whenever number in the first column changes:




    /^[[:blank:]]*#/ {next} # ignore comments (lines starting with #)  
    NF < 3 {next} # ignore lines which don’t have at least 3 columns
    $1 != prev {printf ~n~; prev=$1} # print blank line
    {print} # print the line



    Then, either preprocess your data file by command awk -f addblanks.awk or plot the datafile under a unixish platform by gnuplot> splot ~




    However my version of awk does not understand that code. Instead I had to replace the third line by



    $1 != prev {printf "n"; prev=$1} # print blank line  





    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f900501%2fi-cant-splot-with-pm3d-map-my-data-file-gnuplot%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote













      Your datafile must have the appropriate grid format (xyz or matrix -> these two links should clarify [1], [2]). Following the xyz format your x column must be arranged in a way that there is a blank line between every change in x-value.



      For example a xyz grid format is:



      # X   Y    Z
      0 0 0
      0 1 1
      0 2 4
      0 3 9
      0 4 16
      0 5 25

      1 0 1
      1 1 2
      1 2 5
      1 3 10
      1 4 17
      1 5 26
      ... ... ...


      The reason for this grid format is that you aim to plot a 2D projection of contour-isolines since you use pm3d map.



      However, notice that if your datafile contains data e.g. as a result of a function, this doesn't mean necessarily that they have a grid format and you have to find a programming way in order to give them this format. Maybe this TAB format, that i am unaware of, has data in "grid" format and needs just the sorting of x column and the addition of blank lines.






      share|improve this answer

























        up vote
        1
        down vote













        Your datafile must have the appropriate grid format (xyz or matrix -> these two links should clarify [1], [2]). Following the xyz format your x column must be arranged in a way that there is a blank line between every change in x-value.



        For example a xyz grid format is:



        # X   Y    Z
        0 0 0
        0 1 1
        0 2 4
        0 3 9
        0 4 16
        0 5 25

        1 0 1
        1 1 2
        1 2 5
        1 3 10
        1 4 17
        1 5 26
        ... ... ...


        The reason for this grid format is that you aim to plot a 2D projection of contour-isolines since you use pm3d map.



        However, notice that if your datafile contains data e.g. as a result of a function, this doesn't mean necessarily that they have a grid format and you have to find a programming way in order to give them this format. Maybe this TAB format, that i am unaware of, has data in "grid" format and needs just the sorting of x column and the addition of blank lines.






        share|improve this answer























          up vote
          1
          down vote










          up vote
          1
          down vote









          Your datafile must have the appropriate grid format (xyz or matrix -> these two links should clarify [1], [2]). Following the xyz format your x column must be arranged in a way that there is a blank line between every change in x-value.



          For example a xyz grid format is:



          # X   Y    Z
          0 0 0
          0 1 1
          0 2 4
          0 3 9
          0 4 16
          0 5 25

          1 0 1
          1 1 2
          1 2 5
          1 3 10
          1 4 17
          1 5 26
          ... ... ...


          The reason for this grid format is that you aim to plot a 2D projection of contour-isolines since you use pm3d map.



          However, notice that if your datafile contains data e.g. as a result of a function, this doesn't mean necessarily that they have a grid format and you have to find a programming way in order to give them this format. Maybe this TAB format, that i am unaware of, has data in "grid" format and needs just the sorting of x column and the addition of blank lines.






          share|improve this answer












          Your datafile must have the appropriate grid format (xyz or matrix -> these two links should clarify [1], [2]). Following the xyz format your x column must be arranged in a way that there is a blank line between every change in x-value.



          For example a xyz grid format is:



          # X   Y    Z
          0 0 0
          0 1 1
          0 2 4
          0 3 9
          0 4 16
          0 5 25

          1 0 1
          1 1 2
          1 2 5
          1 3 10
          1 4 17
          1 5 26
          ... ... ...


          The reason for this grid format is that you aim to plot a 2D projection of contour-isolines since you use pm3d map.



          However, notice that if your datafile contains data e.g. as a result of a function, this doesn't mean necessarily that they have a grid format and you have to find a programming way in order to give them this format. Maybe this TAB format, that i am unaware of, has data in "grid" format and needs just the sorting of x column and the addition of blank lines.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 22 at 23:30









          KosZer

          135




          135
























              up vote
              0
              down vote













              copy paste answer from http://www.gnuplot.info/faq/faq.html#x1-320003.9




              3.9 Pm3d splot from a datafile does not draw anything



              You do set pm3d; splot ’a.dat’ and no plot but colorbox appears. Perhaps there is no blank line in between two subsequent scans (isolines) in the data file? Add blank lines! If you are curious what this means, then don’t hesitate to look to files like demo/glass.dat or demo/triangle.dat in the gnuplot demo directory.



              You can find useful the following awk script (call it e.g. addblanks.awk) which adds blank lines to a data file whenever number in the first column changes:




              /^[[:blank:]]*#/ {next} # ignore comments (lines starting with #)  
              NF < 3 {next} # ignore lines which don’t have at least 3 columns
              $1 != prev {printf ~n~; prev=$1} # print blank line
              {print} # print the line



              Then, either preprocess your data file by command awk -f addblanks.awk or plot the datafile under a unixish platform by gnuplot> splot ~




              However my version of awk does not understand that code. Instead I had to replace the third line by



              $1 != prev {printf "n"; prev=$1} # print blank line  





              share|improve this answer



























                up vote
                0
                down vote













                copy paste answer from http://www.gnuplot.info/faq/faq.html#x1-320003.9




                3.9 Pm3d splot from a datafile does not draw anything



                You do set pm3d; splot ’a.dat’ and no plot but colorbox appears. Perhaps there is no blank line in between two subsequent scans (isolines) in the data file? Add blank lines! If you are curious what this means, then don’t hesitate to look to files like demo/glass.dat or demo/triangle.dat in the gnuplot demo directory.



                You can find useful the following awk script (call it e.g. addblanks.awk) which adds blank lines to a data file whenever number in the first column changes:




                /^[[:blank:]]*#/ {next} # ignore comments (lines starting with #)  
                NF < 3 {next} # ignore lines which don’t have at least 3 columns
                $1 != prev {printf ~n~; prev=$1} # print blank line
                {print} # print the line



                Then, either preprocess your data file by command awk -f addblanks.awk or plot the datafile under a unixish platform by gnuplot> splot ~




                However my version of awk does not understand that code. Instead I had to replace the third line by



                $1 != prev {printf "n"; prev=$1} # print blank line  





                share|improve this answer

























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  copy paste answer from http://www.gnuplot.info/faq/faq.html#x1-320003.9




                  3.9 Pm3d splot from a datafile does not draw anything



                  You do set pm3d; splot ’a.dat’ and no plot but colorbox appears. Perhaps there is no blank line in between two subsequent scans (isolines) in the data file? Add blank lines! If you are curious what this means, then don’t hesitate to look to files like demo/glass.dat or demo/triangle.dat in the gnuplot demo directory.



                  You can find useful the following awk script (call it e.g. addblanks.awk) which adds blank lines to a data file whenever number in the first column changes:




                  /^[[:blank:]]*#/ {next} # ignore comments (lines starting with #)  
                  NF < 3 {next} # ignore lines which don’t have at least 3 columns
                  $1 != prev {printf ~n~; prev=$1} # print blank line
                  {print} # print the line



                  Then, either preprocess your data file by command awk -f addblanks.awk or plot the datafile under a unixish platform by gnuplot> splot ~




                  However my version of awk does not understand that code. Instead I had to replace the third line by



                  $1 != prev {printf "n"; prev=$1} # print blank line  





                  share|improve this answer














                  copy paste answer from http://www.gnuplot.info/faq/faq.html#x1-320003.9




                  3.9 Pm3d splot from a datafile does not draw anything



                  You do set pm3d; splot ’a.dat’ and no plot but colorbox appears. Perhaps there is no blank line in between two subsequent scans (isolines) in the data file? Add blank lines! If you are curious what this means, then don’t hesitate to look to files like demo/glass.dat or demo/triangle.dat in the gnuplot demo directory.



                  You can find useful the following awk script (call it e.g. addblanks.awk) which adds blank lines to a data file whenever number in the first column changes:




                  /^[[:blank:]]*#/ {next} # ignore comments (lines starting with #)  
                  NF < 3 {next} # ignore lines which don’t have at least 3 columns
                  $1 != prev {printf ~n~; prev=$1} # print blank line
                  {print} # print the line



                  Then, either preprocess your data file by command awk -f addblanks.awk or plot the datafile under a unixish platform by gnuplot> splot ~




                  However my version of awk does not understand that code. Instead I had to replace the third line by



                  $1 != prev {printf "n"; prev=$1} # print blank line  






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 13 '17 at 8:11









                  derHugo

                  2,27021429




                  2,27021429










                  answered Oct 23 '17 at 11:49









                  rehctawrats

                  1156




                  1156






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f900501%2fi-cant-splot-with-pm3d-map-my-data-file-gnuplot%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Category:香港粉麵

                      List *all* the tuples!

                      Channel [V]