For the code given below, when I plot my data, it displays like this:
This incorrect, the display should look like this:
Can you tell me what is the issue here?
Here is my code:
\documentclass[border=4mm]{standalone}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{
fit,
shapes,
pgfplots.groupplots,
}
\pgfplotsset{compat=newest}
\begin{filecontents*}{FIT_costsens.txt}
1 0.055 0.348
2 0.123 0.565
3 0.110 0.304
4 0.068 0.609
5 0.137 0.435
6 0.096 0.304
7 0.110 0.261
8 0.082 0.522
9 0.123 0.435
10 0.123 0.435
100 0.192 0.217
\end{filecontents*}
\begin{document}
\newcommand{\plotcompAdaBstJfe}{FIT_costsens.txt}
\begin{tikzpicture}
\begin{axis}[width=14cm,height=9cm,
legend pos=north east,
xlabel={Ratio},
ylabel={(\%)},
%ymax=30,
ymin=0,
smooth,
y tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=3,
/tikz/.cd
},
grid=both,
every major grid/.style={gray, opacity=0.5}]
\addplot [line width=1.6pt,
mark=none,
mark options={scale=.65}]%
table[x index=0,y index=1,col sep=space] {\plotcompAdaBstJfe};
\addlegendentry{Type I};
\addplot [line width=1.6pt,
mark=none,
red,
mark options={scale=.65}]%
table[x index=0,y index=2,col sep=space] {\plotcompAdaBstJfe};
\addlegendentry{Type II};
\end{axis}
\end{tikzpicture}
\end{document}
smooth
heresmooth
(line 35)?, however the problem persists. Thanks!smooth
fromaxis
fixed it for me. BTW,col sep=space
is default.smooth
here