Plotting from CSV file using comma as decimal separator











up vote
2
down vote

favorite












I'm trying to create a plot with pgfplots from CSV file using semicolon as separator and comma as period.



I've tried parsing /pgf/number format/read comma as period as parameter to both axis and addplot.



When used in axis the parameter is ignored and error occurs, indicating need of read comma as period argument.



When used in addplot I receive :
received error



I'm using MixTex 2.9.6888.



My code:



documentclass{article}
usepackage{tikz, pgfplots,siunitx}
usepackage[lotdepth]{subfig}
RequirePackage{filecontents}

begin{filecontents*}{data.csv}
Column1;MERENI;FI2;URMS2
;1;3,006;17,86
;2;3,997;20,49
;3;5,006;22,86
;4;6,009;25,31
;5;7,001;27,85
;6;8,005;30,52
;7;9,014;33,19
;8;10,001;35,99
;9;11,01;38,73
;10;12,005;41,52
end{filecontents*}

begin{document}
begin{figure}
begin{tikzpicture}
begin{axis}
[
width=linewidth,
grid=major,
grid style={dashed,gray!30},
title={mytitle},
ylabel=$U_[ef]$,
xlabel=$f$,
%/pgf/number format/read comma as period,
y unit=si{volt},
x unit=si{hertz},
ymin = 0, xmin = 0
]
addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv};
end{axis}
end{tikzpicture}
end{figure}
end{document}









share|improve this question









New contributor




hlavir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome, what is the column separator, what is the period sign?
    – Johannes_B
    2 days ago










  • semicolon as column separator, comma as period
    – hlavir
    2 days ago















up vote
2
down vote

favorite












I'm trying to create a plot with pgfplots from CSV file using semicolon as separator and comma as period.



I've tried parsing /pgf/number format/read comma as period as parameter to both axis and addplot.



When used in axis the parameter is ignored and error occurs, indicating need of read comma as period argument.



When used in addplot I receive :
received error



I'm using MixTex 2.9.6888.



My code:



documentclass{article}
usepackage{tikz, pgfplots,siunitx}
usepackage[lotdepth]{subfig}
RequirePackage{filecontents}

begin{filecontents*}{data.csv}
Column1;MERENI;FI2;URMS2
;1;3,006;17,86
;2;3,997;20,49
;3;5,006;22,86
;4;6,009;25,31
;5;7,001;27,85
;6;8,005;30,52
;7;9,014;33,19
;8;10,001;35,99
;9;11,01;38,73
;10;12,005;41,52
end{filecontents*}

begin{document}
begin{figure}
begin{tikzpicture}
begin{axis}
[
width=linewidth,
grid=major,
grid style={dashed,gray!30},
title={mytitle},
ylabel=$U_[ef]$,
xlabel=$f$,
%/pgf/number format/read comma as period,
y unit=si{volt},
x unit=si{hertz},
ymin = 0, xmin = 0
]
addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv};
end{axis}
end{tikzpicture}
end{figure}
end{document}









share|improve this question









New contributor




hlavir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome, what is the column separator, what is the period sign?
    – Johannes_B
    2 days ago










  • semicolon as column separator, comma as period
    – hlavir
    2 days ago













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I'm trying to create a plot with pgfplots from CSV file using semicolon as separator and comma as period.



I've tried parsing /pgf/number format/read comma as period as parameter to both axis and addplot.



When used in axis the parameter is ignored and error occurs, indicating need of read comma as period argument.



When used in addplot I receive :
received error



I'm using MixTex 2.9.6888.



My code:



documentclass{article}
usepackage{tikz, pgfplots,siunitx}
usepackage[lotdepth]{subfig}
RequirePackage{filecontents}

begin{filecontents*}{data.csv}
Column1;MERENI;FI2;URMS2
;1;3,006;17,86
;2;3,997;20,49
;3;5,006;22,86
;4;6,009;25,31
;5;7,001;27,85
;6;8,005;30,52
;7;9,014;33,19
;8;10,001;35,99
;9;11,01;38,73
;10;12,005;41,52
end{filecontents*}

begin{document}
begin{figure}
begin{tikzpicture}
begin{axis}
[
width=linewidth,
grid=major,
grid style={dashed,gray!30},
title={mytitle},
ylabel=$U_[ef]$,
xlabel=$f$,
%/pgf/number format/read comma as period,
y unit=si{volt},
x unit=si{hertz},
ymin = 0, xmin = 0
]
addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv};
end{axis}
end{tikzpicture}
end{figure}
end{document}









share|improve this question









New contributor




hlavir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm trying to create a plot with pgfplots from CSV file using semicolon as separator and comma as period.



I've tried parsing /pgf/number format/read comma as period as parameter to both axis and addplot.



When used in axis the parameter is ignored and error occurs, indicating need of read comma as period argument.



When used in addplot I receive :
received error



I'm using MixTex 2.9.6888.



My code:



documentclass{article}
usepackage{tikz, pgfplots,siunitx}
usepackage[lotdepth]{subfig}
RequirePackage{filecontents}

begin{filecontents*}{data.csv}
Column1;MERENI;FI2;URMS2
;1;3,006;17,86
;2;3,997;20,49
;3;5,006;22,86
;4;6,009;25,31
;5;7,001;27,85
;6;8,005;30,52
;7;9,014;33,19
;8;10,001;35,99
;9;11,01;38,73
;10;12,005;41,52
end{filecontents*}

begin{document}
begin{figure}
begin{tikzpicture}
begin{axis}
[
width=linewidth,
grid=major,
grid style={dashed,gray!30},
title={mytitle},
ylabel=$U_[ef]$,
xlabel=$f$,
%/pgf/number format/read comma as period,
y unit=si{volt},
x unit=si{hertz},
ymin = 0, xmin = 0
]
addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv};
end{axis}
end{tikzpicture}
end{figure}
end{document}






tikz-pgf pgfplots






share|improve this question









New contributor




hlavir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




hlavir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 1 hour ago









CarLaTeX

28.2k446122




28.2k446122






New contributor




hlavir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









hlavir

132




132




New contributor




hlavir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





hlavir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






hlavir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Welcome, what is the column separator, what is the period sign?
    – Johannes_B
    2 days ago










  • semicolon as column separator, comma as period
    – hlavir
    2 days ago


















  • Welcome, what is the column separator, what is the period sign?
    – Johannes_B
    2 days ago










  • semicolon as column separator, comma as period
    – hlavir
    2 days ago
















Welcome, what is the column separator, what is the period sign?
– Johannes_B
2 days ago




Welcome, what is the column separator, what is the period sign?
– Johannes_B
2 days ago












semicolon as column separator, comma as period
– hlavir
2 days ago




semicolon as column separator, comma as period
– hlavir
2 days ago










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










After spending (naïvely, I must admit) scrolling the logs looking for "why can't pgfplots read my table", I found out that the problem is not at all related to the format of your data table. Actually, the exact same error shows up if you compile this code:



documentclass{article}
usepackage{pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[ylabel=$U_[ef]$]
addplot coordinates {(0,0)(1,1)};
end{axis}
end{tikzpicture}
end{document}


This will break because the axis environment takes an optional argument delimited by [...]. When scanning for the ] delimiter TeX will take the first ] that is in the same nesting level (i.e. not inside braces), and the one which fits the requirement is the closing bracket in U_[ef], so the text passed to axis will be ylabel=$U_[ef which will unbalance the $...$ then stuff will break.



To fix this you have to hide the ] in brackets like this:



begin{axis}[ylabel=$U_{[ef]}$]% DO use this


this one



begin{axis}[{{ylabel=$U_[ef]$}}]% Don't use this


and even this one



begin{axis}[ylabel=$U_[ef{]}$]% Don't use this


will compile too, but the output will not be as expected, and the syntax is dubious, at least.



You are also missing the units library to use x unit and y unit. It'll work after that:




enter image description here




documentclass{standalone}
usepackage{tikz,pgfplots,siunitx}
usepgfplotslibrary{units}
RequirePackage{filecontents}
begin{filecontents*}{data.csv}
Column1;MERENI;FI2;URMS2
;1;3,006;17,86
;2;3,997;20,49
;3;5,006;22,86
;4;6,009;25,31
;5;7,001;27,85
;6;8,005;30,52
;7;9,014;33,19
;8;10,001;35,99
;9;11,01;38,73
;10;12,005;41,52
end{filecontents*}
begin{document}
begin{tikzpicture}
begin{axis}
[
width=linewidth,
grid=major,
grid style={dashed,gray!30},
title={mytitle},
ylabel=$U_{[ef]}$,
xlabel=$f$,
%/pgf/number format/read comma as period,
y unit=si{volt},
x unit=si{hertz},
ymin = 0, xmin = 0
]
addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv};
end{axis}
end{tikzpicture}
end{document}





share|improve this answer























  • I completely missed the brackets. Thank you for your help.
    – hlavir
    2 days ago










  • @hlavir You're welcome :) This is actually an interesting issue. I don't think pgfplots should break with this input (even if it's actually incorrect). Perhaps it's a bug. I'll investigate later.
    – Phelype Oleinik
    2 days ago






  • 2




    I think that the problem is commented somewhere in pgfkeys: if you have a ] in a key argument, you must include it in braces, otherwise the bracket is seen as closing the options, and havoc arises...
    – Rmano
    2 days ago










  • I agree to Rmano's comment. This is a general LaTeX problem I think. Always when you have optional arguments and the argument (itself) contains a closing square bracket it is seen as the closing bracket for the optional argument. To avoid this, on has to enclose the argument (parts) in curly brackets.
    – Stefan Pinnow
    10 hours ago










  • @StefanPinnow I agree, optional argument handling is fragile. However, I wouldn't expect this to happen because in this particular case the brackets are handled by pgfkeys correctly (supposedly) because the delimiters here are , and =. It only breaks when the ylabel is used. I think that whatever package is responsible for this part should secure the argument to ylabel so that argument handling is not compromised. For me (not knowing how the code works) it looks more like a misfeature than a limitation of the method. I might be judging wrong, of course.
    – Phelype Oleinik
    10 hours ago











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',
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
});


}
});






hlavir is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462949%2fplotting-from-csv-file-using-comma-as-decimal-separator%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








up vote
1
down vote



accepted










After spending (naïvely, I must admit) scrolling the logs looking for "why can't pgfplots read my table", I found out that the problem is not at all related to the format of your data table. Actually, the exact same error shows up if you compile this code:



documentclass{article}
usepackage{pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[ylabel=$U_[ef]$]
addplot coordinates {(0,0)(1,1)};
end{axis}
end{tikzpicture}
end{document}


This will break because the axis environment takes an optional argument delimited by [...]. When scanning for the ] delimiter TeX will take the first ] that is in the same nesting level (i.e. not inside braces), and the one which fits the requirement is the closing bracket in U_[ef], so the text passed to axis will be ylabel=$U_[ef which will unbalance the $...$ then stuff will break.



To fix this you have to hide the ] in brackets like this:



begin{axis}[ylabel=$U_{[ef]}$]% DO use this


this one



begin{axis}[{{ylabel=$U_[ef]$}}]% Don't use this


and even this one



begin{axis}[ylabel=$U_[ef{]}$]% Don't use this


will compile too, but the output will not be as expected, and the syntax is dubious, at least.



You are also missing the units library to use x unit and y unit. It'll work after that:




enter image description here




documentclass{standalone}
usepackage{tikz,pgfplots,siunitx}
usepgfplotslibrary{units}
RequirePackage{filecontents}
begin{filecontents*}{data.csv}
Column1;MERENI;FI2;URMS2
;1;3,006;17,86
;2;3,997;20,49
;3;5,006;22,86
;4;6,009;25,31
;5;7,001;27,85
;6;8,005;30,52
;7;9,014;33,19
;8;10,001;35,99
;9;11,01;38,73
;10;12,005;41,52
end{filecontents*}
begin{document}
begin{tikzpicture}
begin{axis}
[
width=linewidth,
grid=major,
grid style={dashed,gray!30},
title={mytitle},
ylabel=$U_{[ef]}$,
xlabel=$f$,
%/pgf/number format/read comma as period,
y unit=si{volt},
x unit=si{hertz},
ymin = 0, xmin = 0
]
addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv};
end{axis}
end{tikzpicture}
end{document}





share|improve this answer























  • I completely missed the brackets. Thank you for your help.
    – hlavir
    2 days ago










  • @hlavir You're welcome :) This is actually an interesting issue. I don't think pgfplots should break with this input (even if it's actually incorrect). Perhaps it's a bug. I'll investigate later.
    – Phelype Oleinik
    2 days ago






  • 2




    I think that the problem is commented somewhere in pgfkeys: if you have a ] in a key argument, you must include it in braces, otherwise the bracket is seen as closing the options, and havoc arises...
    – Rmano
    2 days ago










  • I agree to Rmano's comment. This is a general LaTeX problem I think. Always when you have optional arguments and the argument (itself) contains a closing square bracket it is seen as the closing bracket for the optional argument. To avoid this, on has to enclose the argument (parts) in curly brackets.
    – Stefan Pinnow
    10 hours ago










  • @StefanPinnow I agree, optional argument handling is fragile. However, I wouldn't expect this to happen because in this particular case the brackets are handled by pgfkeys correctly (supposedly) because the delimiters here are , and =. It only breaks when the ylabel is used. I think that whatever package is responsible for this part should secure the argument to ylabel so that argument handling is not compromised. For me (not knowing how the code works) it looks more like a misfeature than a limitation of the method. I might be judging wrong, of course.
    – Phelype Oleinik
    10 hours ago















up vote
1
down vote



accepted










After spending (naïvely, I must admit) scrolling the logs looking for "why can't pgfplots read my table", I found out that the problem is not at all related to the format of your data table. Actually, the exact same error shows up if you compile this code:



documentclass{article}
usepackage{pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[ylabel=$U_[ef]$]
addplot coordinates {(0,0)(1,1)};
end{axis}
end{tikzpicture}
end{document}


This will break because the axis environment takes an optional argument delimited by [...]. When scanning for the ] delimiter TeX will take the first ] that is in the same nesting level (i.e. not inside braces), and the one which fits the requirement is the closing bracket in U_[ef], so the text passed to axis will be ylabel=$U_[ef which will unbalance the $...$ then stuff will break.



To fix this you have to hide the ] in brackets like this:



begin{axis}[ylabel=$U_{[ef]}$]% DO use this


this one



begin{axis}[{{ylabel=$U_[ef]$}}]% Don't use this


and even this one



begin{axis}[ylabel=$U_[ef{]}$]% Don't use this


will compile too, but the output will not be as expected, and the syntax is dubious, at least.



You are also missing the units library to use x unit and y unit. It'll work after that:




enter image description here




documentclass{standalone}
usepackage{tikz,pgfplots,siunitx}
usepgfplotslibrary{units}
RequirePackage{filecontents}
begin{filecontents*}{data.csv}
Column1;MERENI;FI2;URMS2
;1;3,006;17,86
;2;3,997;20,49
;3;5,006;22,86
;4;6,009;25,31
;5;7,001;27,85
;6;8,005;30,52
;7;9,014;33,19
;8;10,001;35,99
;9;11,01;38,73
;10;12,005;41,52
end{filecontents*}
begin{document}
begin{tikzpicture}
begin{axis}
[
width=linewidth,
grid=major,
grid style={dashed,gray!30},
title={mytitle},
ylabel=$U_{[ef]}$,
xlabel=$f$,
%/pgf/number format/read comma as period,
y unit=si{volt},
x unit=si{hertz},
ymin = 0, xmin = 0
]
addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv};
end{axis}
end{tikzpicture}
end{document}





share|improve this answer























  • I completely missed the brackets. Thank you for your help.
    – hlavir
    2 days ago










  • @hlavir You're welcome :) This is actually an interesting issue. I don't think pgfplots should break with this input (even if it's actually incorrect). Perhaps it's a bug. I'll investigate later.
    – Phelype Oleinik
    2 days ago






  • 2




    I think that the problem is commented somewhere in pgfkeys: if you have a ] in a key argument, you must include it in braces, otherwise the bracket is seen as closing the options, and havoc arises...
    – Rmano
    2 days ago










  • I agree to Rmano's comment. This is a general LaTeX problem I think. Always when you have optional arguments and the argument (itself) contains a closing square bracket it is seen as the closing bracket for the optional argument. To avoid this, on has to enclose the argument (parts) in curly brackets.
    – Stefan Pinnow
    10 hours ago










  • @StefanPinnow I agree, optional argument handling is fragile. However, I wouldn't expect this to happen because in this particular case the brackets are handled by pgfkeys correctly (supposedly) because the delimiters here are , and =. It only breaks when the ylabel is used. I think that whatever package is responsible for this part should secure the argument to ylabel so that argument handling is not compromised. For me (not knowing how the code works) it looks more like a misfeature than a limitation of the method. I might be judging wrong, of course.
    – Phelype Oleinik
    10 hours ago













up vote
1
down vote



accepted







up vote
1
down vote



accepted






After spending (naïvely, I must admit) scrolling the logs looking for "why can't pgfplots read my table", I found out that the problem is not at all related to the format of your data table. Actually, the exact same error shows up if you compile this code:



documentclass{article}
usepackage{pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[ylabel=$U_[ef]$]
addplot coordinates {(0,0)(1,1)};
end{axis}
end{tikzpicture}
end{document}


This will break because the axis environment takes an optional argument delimited by [...]. When scanning for the ] delimiter TeX will take the first ] that is in the same nesting level (i.e. not inside braces), and the one which fits the requirement is the closing bracket in U_[ef], so the text passed to axis will be ylabel=$U_[ef which will unbalance the $...$ then stuff will break.



To fix this you have to hide the ] in brackets like this:



begin{axis}[ylabel=$U_{[ef]}$]% DO use this


this one



begin{axis}[{{ylabel=$U_[ef]$}}]% Don't use this


and even this one



begin{axis}[ylabel=$U_[ef{]}$]% Don't use this


will compile too, but the output will not be as expected, and the syntax is dubious, at least.



You are also missing the units library to use x unit and y unit. It'll work after that:




enter image description here




documentclass{standalone}
usepackage{tikz,pgfplots,siunitx}
usepgfplotslibrary{units}
RequirePackage{filecontents}
begin{filecontents*}{data.csv}
Column1;MERENI;FI2;URMS2
;1;3,006;17,86
;2;3,997;20,49
;3;5,006;22,86
;4;6,009;25,31
;5;7,001;27,85
;6;8,005;30,52
;7;9,014;33,19
;8;10,001;35,99
;9;11,01;38,73
;10;12,005;41,52
end{filecontents*}
begin{document}
begin{tikzpicture}
begin{axis}
[
width=linewidth,
grid=major,
grid style={dashed,gray!30},
title={mytitle},
ylabel=$U_{[ef]}$,
xlabel=$f$,
%/pgf/number format/read comma as period,
y unit=si{volt},
x unit=si{hertz},
ymin = 0, xmin = 0
]
addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv};
end{axis}
end{tikzpicture}
end{document}





share|improve this answer














After spending (naïvely, I must admit) scrolling the logs looking for "why can't pgfplots read my table", I found out that the problem is not at all related to the format of your data table. Actually, the exact same error shows up if you compile this code:



documentclass{article}
usepackage{pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[ylabel=$U_[ef]$]
addplot coordinates {(0,0)(1,1)};
end{axis}
end{tikzpicture}
end{document}


This will break because the axis environment takes an optional argument delimited by [...]. When scanning for the ] delimiter TeX will take the first ] that is in the same nesting level (i.e. not inside braces), and the one which fits the requirement is the closing bracket in U_[ef], so the text passed to axis will be ylabel=$U_[ef which will unbalance the $...$ then stuff will break.



To fix this you have to hide the ] in brackets like this:



begin{axis}[ylabel=$U_{[ef]}$]% DO use this


this one



begin{axis}[{{ylabel=$U_[ef]$}}]% Don't use this


and even this one



begin{axis}[ylabel=$U_[ef{]}$]% Don't use this


will compile too, but the output will not be as expected, and the syntax is dubious, at least.



You are also missing the units library to use x unit and y unit. It'll work after that:




enter image description here




documentclass{standalone}
usepackage{tikz,pgfplots,siunitx}
usepgfplotslibrary{units}
RequirePackage{filecontents}
begin{filecontents*}{data.csv}
Column1;MERENI;FI2;URMS2
;1;3,006;17,86
;2;3,997;20,49
;3;5,006;22,86
;4;6,009;25,31
;5;7,001;27,85
;6;8,005;30,52
;7;9,014;33,19
;8;10,001;35,99
;9;11,01;38,73
;10;12,005;41,52
end{filecontents*}
begin{document}
begin{tikzpicture}
begin{axis}
[
width=linewidth,
grid=major,
grid style={dashed,gray!30},
title={mytitle},
ylabel=$U_{[ef]}$,
xlabel=$f$,
%/pgf/number format/read comma as period,
y unit=si{volt},
x unit=si{hertz},
ymin = 0, xmin = 0
]
addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv};
end{axis}
end{tikzpicture}
end{document}






share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 2 days ago









Phelype Oleinik

21k54380




21k54380












  • I completely missed the brackets. Thank you for your help.
    – hlavir
    2 days ago










  • @hlavir You're welcome :) This is actually an interesting issue. I don't think pgfplots should break with this input (even if it's actually incorrect). Perhaps it's a bug. I'll investigate later.
    – Phelype Oleinik
    2 days ago






  • 2




    I think that the problem is commented somewhere in pgfkeys: if you have a ] in a key argument, you must include it in braces, otherwise the bracket is seen as closing the options, and havoc arises...
    – Rmano
    2 days ago










  • I agree to Rmano's comment. This is a general LaTeX problem I think. Always when you have optional arguments and the argument (itself) contains a closing square bracket it is seen as the closing bracket for the optional argument. To avoid this, on has to enclose the argument (parts) in curly brackets.
    – Stefan Pinnow
    10 hours ago










  • @StefanPinnow I agree, optional argument handling is fragile. However, I wouldn't expect this to happen because in this particular case the brackets are handled by pgfkeys correctly (supposedly) because the delimiters here are , and =. It only breaks when the ylabel is used. I think that whatever package is responsible for this part should secure the argument to ylabel so that argument handling is not compromised. For me (not knowing how the code works) it looks more like a misfeature than a limitation of the method. I might be judging wrong, of course.
    – Phelype Oleinik
    10 hours ago


















  • I completely missed the brackets. Thank you for your help.
    – hlavir
    2 days ago










  • @hlavir You're welcome :) This is actually an interesting issue. I don't think pgfplots should break with this input (even if it's actually incorrect). Perhaps it's a bug. I'll investigate later.
    – Phelype Oleinik
    2 days ago






  • 2




    I think that the problem is commented somewhere in pgfkeys: if you have a ] in a key argument, you must include it in braces, otherwise the bracket is seen as closing the options, and havoc arises...
    – Rmano
    2 days ago










  • I agree to Rmano's comment. This is a general LaTeX problem I think. Always when you have optional arguments and the argument (itself) contains a closing square bracket it is seen as the closing bracket for the optional argument. To avoid this, on has to enclose the argument (parts) in curly brackets.
    – Stefan Pinnow
    10 hours ago










  • @StefanPinnow I agree, optional argument handling is fragile. However, I wouldn't expect this to happen because in this particular case the brackets are handled by pgfkeys correctly (supposedly) because the delimiters here are , and =. It only breaks when the ylabel is used. I think that whatever package is responsible for this part should secure the argument to ylabel so that argument handling is not compromised. For me (not knowing how the code works) it looks more like a misfeature than a limitation of the method. I might be judging wrong, of course.
    – Phelype Oleinik
    10 hours ago
















I completely missed the brackets. Thank you for your help.
– hlavir
2 days ago




I completely missed the brackets. Thank you for your help.
– hlavir
2 days ago












@hlavir You're welcome :) This is actually an interesting issue. I don't think pgfplots should break with this input (even if it's actually incorrect). Perhaps it's a bug. I'll investigate later.
– Phelype Oleinik
2 days ago




@hlavir You're welcome :) This is actually an interesting issue. I don't think pgfplots should break with this input (even if it's actually incorrect). Perhaps it's a bug. I'll investigate later.
– Phelype Oleinik
2 days ago




2




2




I think that the problem is commented somewhere in pgfkeys: if you have a ] in a key argument, you must include it in braces, otherwise the bracket is seen as closing the options, and havoc arises...
– Rmano
2 days ago




I think that the problem is commented somewhere in pgfkeys: if you have a ] in a key argument, you must include it in braces, otherwise the bracket is seen as closing the options, and havoc arises...
– Rmano
2 days ago












I agree to Rmano's comment. This is a general LaTeX problem I think. Always when you have optional arguments and the argument (itself) contains a closing square bracket it is seen as the closing bracket for the optional argument. To avoid this, on has to enclose the argument (parts) in curly brackets.
– Stefan Pinnow
10 hours ago




I agree to Rmano's comment. This is a general LaTeX problem I think. Always when you have optional arguments and the argument (itself) contains a closing square bracket it is seen as the closing bracket for the optional argument. To avoid this, on has to enclose the argument (parts) in curly brackets.
– Stefan Pinnow
10 hours ago












@StefanPinnow I agree, optional argument handling is fragile. However, I wouldn't expect this to happen because in this particular case the brackets are handled by pgfkeys correctly (supposedly) because the delimiters here are , and =. It only breaks when the ylabel is used. I think that whatever package is responsible for this part should secure the argument to ylabel so that argument handling is not compromised. For me (not knowing how the code works) it looks more like a misfeature than a limitation of the method. I might be judging wrong, of course.
– Phelype Oleinik
10 hours ago




@StefanPinnow I agree, optional argument handling is fragile. However, I wouldn't expect this to happen because in this particular case the brackets are handled by pgfkeys correctly (supposedly) because the delimiters here are , and =. It only breaks when the ylabel is used. I think that whatever package is responsible for this part should secure the argument to ylabel so that argument handling is not compromised. For me (not knowing how the code works) it looks more like a misfeature than a limitation of the method. I might be judging wrong, of course.
– Phelype Oleinik
10 hours ago










hlavir is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















hlavir is a new contributor. Be nice, and check out our Code of Conduct.













hlavir is a new contributor. Be nice, and check out our Code of Conduct.












hlavir is a new contributor. Be nice, and check out our Code of Conduct.
















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.





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%2ftex.stackexchange.com%2fquestions%2f462949%2fplotting-from-csv-file-using-comma-as-decimal-separator%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

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks