I have a file I created for gnuplot. The file is like this:
0.1 0.2 0.001
0.2 0.4 0.001
0.3 0.6 0.001
The first column represent the x axis. The second column represent the y axis. The third column represent the error over the y data.
It is possible to plot such a file whit pgfplots without changing it. How I enable error bars from a file?
This is my configuration for pgfplots:
\usepackage{pgfplots}
\pgfplotsset{%
compat=newest,%
/pgf/number format/use comma,%
/pgf/number format/1000 sep={\,},%
/pgf/number format/min exponent for 1000 sep=4}
And this is the code I usually use to create a graph:
\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[xmin=0,xmax=1000,ymin=0,ymax=1000,title={},%
xlabel={}, ylabel={},%
legend cell align=left]
\addplot[red,thick]
file {data1.dat};
\addplot[blue,thick]
file {data2.dat};
\legend{,}
\end{axis}
\end{tikzpicture}
\caption[]{} \label{}
\end{figure}
PS: If I have a file with four columns (x data, y data, x error, y error) can I do the same?