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 :
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
New contributor
add a comment |
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 :
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
New contributor
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
add a comment |
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 :
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
New contributor
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 :
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
tikz-pgf pgfplots
New contributor
New contributor
edited 1 hour ago
CarLaTeX
28.2k446122
28.2k446122
New contributor
asked 2 days ago
hlavir
132
132
New contributor
New contributor
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
add a comment |
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
add a comment |
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:
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}
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 thinkpgfplots
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 inpgfkeys
: 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 bypgfkeys
correctly (supposedly) because the delimiters here are,
and=
. It only breaks when theylabel
is used. I think that whatever package is responsible for this part should secure the argument toylabel
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
|
show 2 more comments
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:
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}
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 thinkpgfplots
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 inpgfkeys
: 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 bypgfkeys
correctly (supposedly) because the delimiters here are,
and=
. It only breaks when theylabel
is used. I think that whatever package is responsible for this part should secure the argument toylabel
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
|
show 2 more comments
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:
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}
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 thinkpgfplots
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 inpgfkeys
: 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 bypgfkeys
correctly (supposedly) because the delimiters here are,
and=
. It only breaks when theylabel
is used. I think that whatever package is responsible for this part should secure the argument toylabel
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
|
show 2 more comments
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:
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}
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:
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}
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 thinkpgfplots
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 inpgfkeys
: 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 bypgfkeys
correctly (supposedly) because the delimiters here are,
and=
. It only breaks when theylabel
is used. I think that whatever package is responsible for this part should secure the argument toylabel
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
|
show 2 more comments
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 thinkpgfplots
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 inpgfkeys
: 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 bypgfkeys
correctly (supposedly) because the delimiters here are,
and=
. It only breaks when theylabel
is used. I think that whatever package is responsible for this part should secure the argument toylabel
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
|
show 2 more comments
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.
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.
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%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
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
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