How to change data file format from Gnuplot to Tikz errorbars
Clash Royale CLAN TAG#URR8PPP
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
add a comment |
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
add a comment |
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
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
text-processing awk sed
edited Jan 2 at 1:00
terdon♦
129k32253428
129k32253428
asked Jan 1 at 20:52
user1993416user1993416
1135
1135
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
edited Jan 2 at 0:59
terdon♦
129k32253428
129k32253428
answered Jan 1 at 21:26
JJoaoJJoao
7,1691928
7,1691928
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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