LTSpice - PGF/TikZ












2















I am a newcomer to LaTeX and came across PGF/TikZ by chance.
Currently I try to draw the function graphs f(x) in PGF/TikZ, but with no success.
Can anyone help me to read the data file from LTSpice with PGF/TikZ and draw them afterwards?





documentclass{article}

usepackage{pgfplots}
usepackage{array}
usepackage{booktabs}
usepackage{pgfplotstable}

begin{document}
pgfplotstabletypesetfile{LM317.txt}
end{document}



Error-Message: ! Text line contains an invalid character.
t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@
^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt} ^^M




enter image description here



Data as text (UTF-8)



time                   V(n005)       V(n001)        V(n003)
0.000000000000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
1.031821995489313e-99 1.994824e-06 1.102979e-18 9.197703e-25
1.105501326095841e-09 2.155836e-06 5.366109e-19 -1.368576e-24
1.252859987308896e-09 2.527454e-06 -7.874506e-18 -1.056591e-23
1.547577309735008e-09 3.496970e-06 -2.185391e-17 -2.762964e-23
2.137011954587231e-09 6.286433e-06 -3.816860e-17 -4.617686e-23
3.022983821851659e-09 1.217947e-05 -3.697916e-17 -3.764493e-23
3.877261642553005e-99 1.941849e-05 -5.500619e-18 2.255405e-23
5.199523428066601e-09 3.129201e-05 2.971325e-17 1.256328e-22
6.574180098003653e-09 4.121817e-05 -1.604368e-17 1.082905e-22
8.179971204820860e-09 4.819972e-05 -4.373686e-17 2.275496e-23
1.010285679622539e-08 5.403126e-05 2.425893e-17 -3.358998e-23
1.189592599779081e-08 6.256012e-05 7.426873e-18 -2.161916e-22
1.379091751168107e-08 7.659331e-05 -3.980423e-17 -5.083033e-22









share|improve this question




















  • 2





    What is LTSpice?

    – AndréC
    Jan 12 at 6:52






  • 1





    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

    – Stefan Pinnow
    Jan 12 at 6:55











  • I don't know that LTSpice is, but you can use draw plot (); to draw plots. For example, draw plot[smooth,domain=-1:1] (x,(x)^2); gives you the plot of f(x)=x^2.

    – JouleV
    Jan 12 at 7:18











  • LTSpice is used for the simulation of electrical circuits. In this software it is possible to export the measuring points into a *.txt file. My approach would have been to call this file in LaTeX and draw the function graphs myself using PGF/TikZ.

    – user179354
    Jan 12 at 8:30











  • documentclass{article} usepackage{pgfplots} usepackage{array} usepackage{booktabs} usepackage{pgfplotstable} begin{document} pgfplotstabletypesetfile{LM317.txt} end{document} Message: ! Text line contains an invalid character. <read 1> t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt}

    – user179354
    Jan 12 at 8:35
















2















I am a newcomer to LaTeX and came across PGF/TikZ by chance.
Currently I try to draw the function graphs f(x) in PGF/TikZ, but with no success.
Can anyone help me to read the data file from LTSpice with PGF/TikZ and draw them afterwards?





documentclass{article}

usepackage{pgfplots}
usepackage{array}
usepackage{booktabs}
usepackage{pgfplotstable}

begin{document}
pgfplotstabletypesetfile{LM317.txt}
end{document}



Error-Message: ! Text line contains an invalid character.
t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@
^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt} ^^M




enter image description here



Data as text (UTF-8)



time                   V(n005)       V(n001)        V(n003)
0.000000000000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
1.031821995489313e-99 1.994824e-06 1.102979e-18 9.197703e-25
1.105501326095841e-09 2.155836e-06 5.366109e-19 -1.368576e-24
1.252859987308896e-09 2.527454e-06 -7.874506e-18 -1.056591e-23
1.547577309735008e-09 3.496970e-06 -2.185391e-17 -2.762964e-23
2.137011954587231e-09 6.286433e-06 -3.816860e-17 -4.617686e-23
3.022983821851659e-09 1.217947e-05 -3.697916e-17 -3.764493e-23
3.877261642553005e-99 1.941849e-05 -5.500619e-18 2.255405e-23
5.199523428066601e-09 3.129201e-05 2.971325e-17 1.256328e-22
6.574180098003653e-09 4.121817e-05 -1.604368e-17 1.082905e-22
8.179971204820860e-09 4.819972e-05 -4.373686e-17 2.275496e-23
1.010285679622539e-08 5.403126e-05 2.425893e-17 -3.358998e-23
1.189592599779081e-08 6.256012e-05 7.426873e-18 -2.161916e-22
1.379091751168107e-08 7.659331e-05 -3.980423e-17 -5.083033e-22









share|improve this question




















  • 2





    What is LTSpice?

    – AndréC
    Jan 12 at 6:52






  • 1





    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

    – Stefan Pinnow
    Jan 12 at 6:55











  • I don't know that LTSpice is, but you can use draw plot (); to draw plots. For example, draw plot[smooth,domain=-1:1] (x,(x)^2); gives you the plot of f(x)=x^2.

    – JouleV
    Jan 12 at 7:18











  • LTSpice is used for the simulation of electrical circuits. In this software it is possible to export the measuring points into a *.txt file. My approach would have been to call this file in LaTeX and draw the function graphs myself using PGF/TikZ.

    – user179354
    Jan 12 at 8:30











  • documentclass{article} usepackage{pgfplots} usepackage{array} usepackage{booktabs} usepackage{pgfplotstable} begin{document} pgfplotstabletypesetfile{LM317.txt} end{document} Message: ! Text line contains an invalid character. <read 1> t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt}

    – user179354
    Jan 12 at 8:35














2












2








2


0






I am a newcomer to LaTeX and came across PGF/TikZ by chance.
Currently I try to draw the function graphs f(x) in PGF/TikZ, but with no success.
Can anyone help me to read the data file from LTSpice with PGF/TikZ and draw them afterwards?





documentclass{article}

usepackage{pgfplots}
usepackage{array}
usepackage{booktabs}
usepackage{pgfplotstable}

begin{document}
pgfplotstabletypesetfile{LM317.txt}
end{document}



Error-Message: ! Text line contains an invalid character.
t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@
^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt} ^^M




enter image description here



Data as text (UTF-8)



time                   V(n005)       V(n001)        V(n003)
0.000000000000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
1.031821995489313e-99 1.994824e-06 1.102979e-18 9.197703e-25
1.105501326095841e-09 2.155836e-06 5.366109e-19 -1.368576e-24
1.252859987308896e-09 2.527454e-06 -7.874506e-18 -1.056591e-23
1.547577309735008e-09 3.496970e-06 -2.185391e-17 -2.762964e-23
2.137011954587231e-09 6.286433e-06 -3.816860e-17 -4.617686e-23
3.022983821851659e-09 1.217947e-05 -3.697916e-17 -3.764493e-23
3.877261642553005e-99 1.941849e-05 -5.500619e-18 2.255405e-23
5.199523428066601e-09 3.129201e-05 2.971325e-17 1.256328e-22
6.574180098003653e-09 4.121817e-05 -1.604368e-17 1.082905e-22
8.179971204820860e-09 4.819972e-05 -4.373686e-17 2.275496e-23
1.010285679622539e-08 5.403126e-05 2.425893e-17 -3.358998e-23
1.189592599779081e-08 6.256012e-05 7.426873e-18 -2.161916e-22
1.379091751168107e-08 7.659331e-05 -3.980423e-17 -5.083033e-22









share|improve this question
















I am a newcomer to LaTeX and came across PGF/TikZ by chance.
Currently I try to draw the function graphs f(x) in PGF/TikZ, but with no success.
Can anyone help me to read the data file from LTSpice with PGF/TikZ and draw them afterwards?





documentclass{article}

usepackage{pgfplots}
usepackage{array}
usepackage{booktabs}
usepackage{pgfplotstable}

begin{document}
pgfplotstabletypesetfile{LM317.txt}
end{document}



Error-Message: ! Text line contains an invalid character.
t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@
^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt} ^^M




enter image description here



Data as text (UTF-8)



time                   V(n005)       V(n001)        V(n003)
0.000000000000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
1.031821995489313e-99 1.994824e-06 1.102979e-18 9.197703e-25
1.105501326095841e-09 2.155836e-06 5.366109e-19 -1.368576e-24
1.252859987308896e-09 2.527454e-06 -7.874506e-18 -1.056591e-23
1.547577309735008e-09 3.496970e-06 -2.185391e-17 -2.762964e-23
2.137011954587231e-09 6.286433e-06 -3.816860e-17 -4.617686e-23
3.022983821851659e-09 1.217947e-05 -3.697916e-17 -3.764493e-23
3.877261642553005e-99 1.941849e-05 -5.500619e-18 2.255405e-23
5.199523428066601e-09 3.129201e-05 2.971325e-17 1.256328e-22
6.574180098003653e-09 4.121817e-05 -1.604368e-17 1.082905e-22
8.179971204820860e-09 4.819972e-05 -4.373686e-17 2.275496e-23
1.010285679622539e-08 5.403126e-05 2.425893e-17 -3.358998e-23
1.189592599779081e-08 6.256012e-05 7.426873e-18 -2.161916e-22
1.379091751168107e-08 7.659331e-05 -3.980423e-17 -5.083033e-22






tikz-pgf tables input-encodings






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 12 at 13:37









David Carlisle

486k4111221865




486k4111221865










asked Jan 12 at 6:42









user179354user179354

111




111








  • 2





    What is LTSpice?

    – AndréC
    Jan 12 at 6:52






  • 1





    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

    – Stefan Pinnow
    Jan 12 at 6:55











  • I don't know that LTSpice is, but you can use draw plot (); to draw plots. For example, draw plot[smooth,domain=-1:1] (x,(x)^2); gives you the plot of f(x)=x^2.

    – JouleV
    Jan 12 at 7:18











  • LTSpice is used for the simulation of electrical circuits. In this software it is possible to export the measuring points into a *.txt file. My approach would have been to call this file in LaTeX and draw the function graphs myself using PGF/TikZ.

    – user179354
    Jan 12 at 8:30











  • documentclass{article} usepackage{pgfplots} usepackage{array} usepackage{booktabs} usepackage{pgfplotstable} begin{document} pgfplotstabletypesetfile{LM317.txt} end{document} Message: ! Text line contains an invalid character. <read 1> t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt}

    – user179354
    Jan 12 at 8:35














  • 2





    What is LTSpice?

    – AndréC
    Jan 12 at 6:52






  • 1





    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

    – Stefan Pinnow
    Jan 12 at 6:55











  • I don't know that LTSpice is, but you can use draw plot (); to draw plots. For example, draw plot[smooth,domain=-1:1] (x,(x)^2); gives you the plot of f(x)=x^2.

    – JouleV
    Jan 12 at 7:18











  • LTSpice is used for the simulation of electrical circuits. In this software it is possible to export the measuring points into a *.txt file. My approach would have been to call this file in LaTeX and draw the function graphs myself using PGF/TikZ.

    – user179354
    Jan 12 at 8:30











  • documentclass{article} usepackage{pgfplots} usepackage{array} usepackage{booktabs} usepackage{pgfplotstable} begin{document} pgfplotstabletypesetfile{LM317.txt} end{document} Message: ! Text line contains an invalid character. <read 1> t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt}

    – user179354
    Jan 12 at 8:35








2




2





What is LTSpice?

– AndréC
Jan 12 at 6:52





What is LTSpice?

– AndréC
Jan 12 at 6:52




1




1





Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

– Stefan Pinnow
Jan 12 at 6:55





Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass{...} and ending with end{document}.

– Stefan Pinnow
Jan 12 at 6:55













I don't know that LTSpice is, but you can use draw plot (); to draw plots. For example, draw plot[smooth,domain=-1:1] (x,(x)^2); gives you the plot of f(x)=x^2.

– JouleV
Jan 12 at 7:18





I don't know that LTSpice is, but you can use draw plot (); to draw plots. For example, draw plot[smooth,domain=-1:1] (x,(x)^2); gives you the plot of f(x)=x^2.

– JouleV
Jan 12 at 7:18













LTSpice is used for the simulation of electrical circuits. In this software it is possible to export the measuring points into a *.txt file. My approach would have been to call this file in LaTeX and draw the function graphs myself using PGF/TikZ.

– user179354
Jan 12 at 8:30





LTSpice is used for the simulation of electrical circuits. In this software it is possible to export the measuring points into a *.txt file. My approach would have been to call this file in LaTeX and draw the function graphs myself using PGF/TikZ.

– user179354
Jan 12 at 8:30













documentclass{article} usepackage{pgfplots} usepackage{array} usepackage{booktabs} usepackage{pgfplotstable} begin{document} pgfplotstabletypesetfile{LM317.txt} end{document} Message: ! Text line contains an invalid character. <read 1> t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt}

– user179354
Jan 12 at 8:35





documentclass{article} usepackage{pgfplots} usepackage{array} usepackage{booktabs} usepackage{pgfplotstable} begin{document} pgfplotstabletypesetfile{LM317.txt} end{document} Message: ! Text line contains an invalid character. <read 1> t^^@ i^^@m^^@e^^@ ^^@V^^@(^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^^@0^^... l.29 pgfplotstabletypesetfile{LM317.txt}

– user179354
Jan 12 at 8:35










1 Answer
1






active

oldest

votes


















7














the ^^@ mean that your txt file is in UTF-16 which isn't the easiest format to handle. use your editor to resave the file in UTF-8



With the posted data, saved as UTF-16, you get



! Text line contains an invalid character.
<read 1> ��^^@
t^^@i^^@m^^@e^^@ ^^@V^^@a^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^...
l.9 pgfplotstabletypesetfile{LM317.txt}
^^M
?


the ^^@ are always an indication of UTF-16, as @ is character 32 so control-@, ^^@ is character 0 so the log is showing that you have a null byte between every character, which is exactly the encoding UTF-16 for characters in the ASCII range.



If You use an editor to resave the data as UTF-8 (or simply copy it back from this site) then your document runs without error, producing



enter image description here






share|improve this answer


























  • Thank you so much for your support.

    – user179354
    Jan 12 at 18:44











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
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%2ftex.stackexchange.com%2fquestions%2f469790%2fltspice-pgf-tikz%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









7














the ^^@ mean that your txt file is in UTF-16 which isn't the easiest format to handle. use your editor to resave the file in UTF-8



With the posted data, saved as UTF-16, you get



! Text line contains an invalid character.
<read 1> ��^^@
t^^@i^^@m^^@e^^@ ^^@V^^@a^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^...
l.9 pgfplotstabletypesetfile{LM317.txt}
^^M
?


the ^^@ are always an indication of UTF-16, as @ is character 32 so control-@, ^^@ is character 0 so the log is showing that you have a null byte between every character, which is exactly the encoding UTF-16 for characters in the ASCII range.



If You use an editor to resave the data as UTF-8 (or simply copy it back from this site) then your document runs without error, producing



enter image description here






share|improve this answer


























  • Thank you so much for your support.

    – user179354
    Jan 12 at 18:44
















7














the ^^@ mean that your txt file is in UTF-16 which isn't the easiest format to handle. use your editor to resave the file in UTF-8



With the posted data, saved as UTF-16, you get



! Text line contains an invalid character.
<read 1> ��^^@
t^^@i^^@m^^@e^^@ ^^@V^^@a^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^...
l.9 pgfplotstabletypesetfile{LM317.txt}
^^M
?


the ^^@ are always an indication of UTF-16, as @ is character 32 so control-@, ^^@ is character 0 so the log is showing that you have a null byte between every character, which is exactly the encoding UTF-16 for characters in the ASCII range.



If You use an editor to resave the data as UTF-8 (or simply copy it back from this site) then your document runs without error, producing



enter image description here






share|improve this answer


























  • Thank you so much for your support.

    – user179354
    Jan 12 at 18:44














7












7








7







the ^^@ mean that your txt file is in UTF-16 which isn't the easiest format to handle. use your editor to resave the file in UTF-8



With the posted data, saved as UTF-16, you get



! Text line contains an invalid character.
<read 1> ��^^@
t^^@i^^@m^^@e^^@ ^^@V^^@a^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^...
l.9 pgfplotstabletypesetfile{LM317.txt}
^^M
?


the ^^@ are always an indication of UTF-16, as @ is character 32 so control-@, ^^@ is character 0 so the log is showing that you have a null byte between every character, which is exactly the encoding UTF-16 for characters in the ASCII range.



If You use an editor to resave the data as UTF-8 (or simply copy it back from this site) then your document runs without error, producing



enter image description here






share|improve this answer















the ^^@ mean that your txt file is in UTF-16 which isn't the easiest format to handle. use your editor to resave the file in UTF-8



With the posted data, saved as UTF-16, you get



! Text line contains an invalid character.
<read 1> ��^^@
t^^@i^^@m^^@e^^@ ^^@V^^@a^^@n^^@0^^@0^^@5^^@)^^@ ^^@V^^@(^^@n^...
l.9 pgfplotstabletypesetfile{LM317.txt}
^^M
?


the ^^@ are always an indication of UTF-16, as @ is character 32 so control-@, ^^@ is character 0 so the log is showing that you have a null byte between every character, which is exactly the encoding UTF-16 for characters in the ASCII range.



If You use an editor to resave the data as UTF-8 (or simply copy it back from this site) then your document runs without error, producing



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 12 at 12:55

























answered Jan 12 at 12:07









David CarlisleDavid Carlisle

486k4111221865




486k4111221865













  • Thank you so much for your support.

    – user179354
    Jan 12 at 18:44



















  • Thank you so much for your support.

    – user179354
    Jan 12 at 18:44

















Thank you so much for your support.

– user179354
Jan 12 at 18:44





Thank you so much for your support.

– user179354
Jan 12 at 18:44


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX 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%2ftex.stackexchange.com%2fquestions%2f469790%2fltspice-pgf-tikz%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 change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents