How to change data file format from Gnuplot to Tikz errorbars

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















I would like to change the format of Gnuplot errorbar data to LaTeX/Tikz format.



For example, the Gnuplot format data is:



5 74.92725 74.7028332590511 75.1516667409489
112.5 112.55897 112.259769398083 112.858170601917
150 149.69954 149.34363510537 150.05544489463
187.5 187.17666 186.776888667849 187.576431332151
225 224.99652 224.445862626087 225.547177373913
262.5 262.41776 261.885021624469 262.950498375531
300 292.136265549781 292.001497790752 292.271033308809
337.5 291.919651585991 291.609116120618 292.230187051365
375 291.422462501904 291.176186050372 291.668738953436
412.5 291.280355443992 290.980439760169 291.580271127815
450 291.280355443992 290.980439760169 291.580271127815


and the Tikz format I need is this:



(75 ,74.92725 ) -=(0,74.7028332590511- 74.92725 ) +=(0, 75.1516667409489 - 74.92725 ) 
(112.5 ,112.55897) -=(0,112.259769398083- 112.55897) +=(0, 112.858170601917 - 112.55897)
(150 ,149.69954) -=(0,149.34363510537 - 149.69954) +=(0, 150.05544489463 - 149.69954)
(187.5 ,187.17666) -=(0,186.776888667849- 187.17666) +=(0, 187.576431332151 - 187.17666)
(225 ,224.99652) -=(0,224.445862626087- 224.99652) +=(0, 225.547177373913 - 224.99652)
(262.5 ,262.41776) -=(0,261.885021624469- 262.41776) +=(0, 262.950498375531 - 262.41776)
(300 ,292.136265549781) -=(0,292.001497790752- 292.136265549781) +=(0, 292.271033308809 - 292.136265549781)
(337.5 ,291.919651585991) -=(0,291.609116120618- 291.919651585991) +=(0, 292.230187051365 - 291.919651585991)
(375 ,291.422462501904) -=(0,291.176186050372- 291.422462501904) +=(0, 291.668738953436 - 291.422462501904)
(412.5 ,291.280355443992) -=(0,290.980439760169- 291.280355443992) +=(0, 291.580271127815 - 291.280355443992)


I have tabulated these result to make it clearer but it is not necessary for Tikz.



I have many files of this type and I would like to know if there is any command to make it easier.



Regards










share|improve this question




























    2















    I would like to change the format of Gnuplot errorbar data to LaTeX/Tikz format.



    For example, the Gnuplot format data is:



    5 74.92725 74.7028332590511 75.1516667409489
    112.5 112.55897 112.259769398083 112.858170601917
    150 149.69954 149.34363510537 150.05544489463
    187.5 187.17666 186.776888667849 187.576431332151
    225 224.99652 224.445862626087 225.547177373913
    262.5 262.41776 261.885021624469 262.950498375531
    300 292.136265549781 292.001497790752 292.271033308809
    337.5 291.919651585991 291.609116120618 292.230187051365
    375 291.422462501904 291.176186050372 291.668738953436
    412.5 291.280355443992 290.980439760169 291.580271127815
    450 291.280355443992 290.980439760169 291.580271127815


    and the Tikz format I need is this:



    (75 ,74.92725 ) -=(0,74.7028332590511- 74.92725 ) +=(0, 75.1516667409489 - 74.92725 ) 
    (112.5 ,112.55897) -=(0,112.259769398083- 112.55897) +=(0, 112.858170601917 - 112.55897)
    (150 ,149.69954) -=(0,149.34363510537 - 149.69954) +=(0, 150.05544489463 - 149.69954)
    (187.5 ,187.17666) -=(0,186.776888667849- 187.17666) +=(0, 187.576431332151 - 187.17666)
    (225 ,224.99652) -=(0,224.445862626087- 224.99652) +=(0, 225.547177373913 - 224.99652)
    (262.5 ,262.41776) -=(0,261.885021624469- 262.41776) +=(0, 262.950498375531 - 262.41776)
    (300 ,292.136265549781) -=(0,292.001497790752- 292.136265549781) +=(0, 292.271033308809 - 292.136265549781)
    (337.5 ,291.919651585991) -=(0,291.609116120618- 291.919651585991) +=(0, 292.230187051365 - 291.919651585991)
    (375 ,291.422462501904) -=(0,291.176186050372- 291.422462501904) +=(0, 291.668738953436 - 291.422462501904)
    (412.5 ,291.280355443992) -=(0,290.980439760169- 291.280355443992) +=(0, 291.580271127815 - 291.280355443992)


    I have tabulated these result to make it clearer but it is not necessary for Tikz.



    I have many files of this type and I would like to know if there is any command to make it easier.



    Regards










    share|improve this question


























      2












      2








      2








      I would like to change the format of Gnuplot errorbar data to LaTeX/Tikz format.



      For example, the Gnuplot format data is:



      5 74.92725 74.7028332590511 75.1516667409489
      112.5 112.55897 112.259769398083 112.858170601917
      150 149.69954 149.34363510537 150.05544489463
      187.5 187.17666 186.776888667849 187.576431332151
      225 224.99652 224.445862626087 225.547177373913
      262.5 262.41776 261.885021624469 262.950498375531
      300 292.136265549781 292.001497790752 292.271033308809
      337.5 291.919651585991 291.609116120618 292.230187051365
      375 291.422462501904 291.176186050372 291.668738953436
      412.5 291.280355443992 290.980439760169 291.580271127815
      450 291.280355443992 290.980439760169 291.580271127815


      and the Tikz format I need is this:



      (75 ,74.92725 ) -=(0,74.7028332590511- 74.92725 ) +=(0, 75.1516667409489 - 74.92725 ) 
      (112.5 ,112.55897) -=(0,112.259769398083- 112.55897) +=(0, 112.858170601917 - 112.55897)
      (150 ,149.69954) -=(0,149.34363510537 - 149.69954) +=(0, 150.05544489463 - 149.69954)
      (187.5 ,187.17666) -=(0,186.776888667849- 187.17666) +=(0, 187.576431332151 - 187.17666)
      (225 ,224.99652) -=(0,224.445862626087- 224.99652) +=(0, 225.547177373913 - 224.99652)
      (262.5 ,262.41776) -=(0,261.885021624469- 262.41776) +=(0, 262.950498375531 - 262.41776)
      (300 ,292.136265549781) -=(0,292.001497790752- 292.136265549781) +=(0, 292.271033308809 - 292.136265549781)
      (337.5 ,291.919651585991) -=(0,291.609116120618- 291.919651585991) +=(0, 292.230187051365 - 291.919651585991)
      (375 ,291.422462501904) -=(0,291.176186050372- 291.422462501904) +=(0, 291.668738953436 - 291.422462501904)
      (412.5 ,291.280355443992) -=(0,290.980439760169- 291.280355443992) +=(0, 291.580271127815 - 291.280355443992)


      I have tabulated these result to make it clearer but it is not necessary for Tikz.



      I have many files of this type and I would like to know if there is any command to make it easier.



      Regards










      share|improve this question
















      I would like to change the format of Gnuplot errorbar data to LaTeX/Tikz format.



      For example, the Gnuplot format data is:



      5 74.92725 74.7028332590511 75.1516667409489
      112.5 112.55897 112.259769398083 112.858170601917
      150 149.69954 149.34363510537 150.05544489463
      187.5 187.17666 186.776888667849 187.576431332151
      225 224.99652 224.445862626087 225.547177373913
      262.5 262.41776 261.885021624469 262.950498375531
      300 292.136265549781 292.001497790752 292.271033308809
      337.5 291.919651585991 291.609116120618 292.230187051365
      375 291.422462501904 291.176186050372 291.668738953436
      412.5 291.280355443992 290.980439760169 291.580271127815
      450 291.280355443992 290.980439760169 291.580271127815


      and the Tikz format I need is this:



      (75 ,74.92725 ) -=(0,74.7028332590511- 74.92725 ) +=(0, 75.1516667409489 - 74.92725 ) 
      (112.5 ,112.55897) -=(0,112.259769398083- 112.55897) +=(0, 112.858170601917 - 112.55897)
      (150 ,149.69954) -=(0,149.34363510537 - 149.69954) +=(0, 150.05544489463 - 149.69954)
      (187.5 ,187.17666) -=(0,186.776888667849- 187.17666) +=(0, 187.576431332151 - 187.17666)
      (225 ,224.99652) -=(0,224.445862626087- 224.99652) +=(0, 225.547177373913 - 224.99652)
      (262.5 ,262.41776) -=(0,261.885021624469- 262.41776) +=(0, 262.950498375531 - 262.41776)
      (300 ,292.136265549781) -=(0,292.001497790752- 292.136265549781) +=(0, 292.271033308809 - 292.136265549781)
      (337.5 ,291.919651585991) -=(0,291.609116120618- 291.919651585991) +=(0, 292.230187051365 - 291.919651585991)
      (375 ,291.422462501904) -=(0,291.176186050372- 291.422462501904) +=(0, 291.668738953436 - 291.422462501904)
      (412.5 ,291.280355443992) -=(0,290.980439760169- 291.280355443992) +=(0, 291.580271127815 - 291.280355443992)


      I have tabulated these result to make it clearer but it is not necessary for Tikz.



      I have many files of this type and I would like to know if there is any command to make it easier.



      Regards







      text-processing awk sed






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 2 at 1:00









      terdon

      129k32253428




      129k32253428










      asked Jan 1 at 20:52









      user1993416user1993416

      1135




      1135




















          1 Answer
          1






          active

          oldest

          votes


















          2














          Try something like:



          awk 'printf("(%s, %s) -=(0, %s-%s) +=(0, %s-%s)n",$1,$2,$3,$2,$4,$2)'


          or even:



          for a in *.gnudata
          do
          awk '....' "$a" > "$a".tikzdata
          done





          share|improve this answer
























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f491915%2fhow-to-change-data-file-format-from-gnuplot-to-tikz-errorbars%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Try something like:



            awk 'printf("(%s, %s) -=(0, %s-%s) +=(0, %s-%s)n",$1,$2,$3,$2,$4,$2)'


            or even:



            for a in *.gnudata
            do
            awk '....' "$a" > "$a".tikzdata
            done





            share|improve this answer





























              2














              Try something like:



              awk 'printf("(%s, %s) -=(0, %s-%s) +=(0, %s-%s)n",$1,$2,$3,$2,$4,$2)'


              or even:



              for a in *.gnudata
              do
              awk '....' "$a" > "$a".tikzdata
              done





              share|improve this answer



























                2












                2








                2







                Try something like:



                awk 'printf("(%s, %s) -=(0, %s-%s) +=(0, %s-%s)n",$1,$2,$3,$2,$4,$2)'


                or even:



                for a in *.gnudata
                do
                awk '....' "$a" > "$a".tikzdata
                done





                share|improve this answer















                Try something like:



                awk 'printf("(%s, %s) -=(0, %s-%s) +=(0, %s-%s)n",$1,$2,$3,$2,$4,$2)'


                or even:



                for a in *.gnudata
                do
                awk '....' "$a" > "$a".tikzdata
                done






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 2 at 0:59









                terdon

                129k32253428




                129k32253428










                answered Jan 1 at 21:26









                JJoaoJJoao

                7,1691928




                7,1691928



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • 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%2funix.stackexchange.com%2fquestions%2f491915%2fhow-to-change-data-file-format-from-gnuplot-to-tikz-errorbars%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

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay