I have a file containing data points that I plot using gnuplot. The file looks as follows:
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 and the third column represent the error over the y data.
It is possible to plot such a file, including error bars, using pgfplots and without changing it? If I have a file with four columns (x data, y data, x error, y error) the same solution apply?
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}