Hi, I am using pgfplots package to draw some diagrams from LyX. The following syntax entered into TEX code works fine. \begin{tikzpicture} \begin{axis}[xlabel=Cost, ylabel=Error] \addplot[color=red,mark=x] coordinates { (2,-2.8559703) (3,-3.5301677) (4,-4.3050655) (5,-5.1413136) (6,-6.0322865) (7,-6.9675052) (8,-7.9377747) }; \end{axis} \end{tikzpicture}
But, if I want to plot from a file, I get errors: -! Package pgfplots Error: sorry, plot file{umwc1.dat} could not be opened. -! Package pgfplots Warning: the current plot has no coordinates (or all have be en filtered away) -! Package pgfplots Warning: You have an axis with empty range. Replacing it with a default range and clearing all plots. The code is: \begin{tikzpicture} \begin{axis}[xlabel=Cost, ylabel=Error] \addplot file {data.dat}; \end{axis} \end{tikzpicture} data.dat file contains two columns with the numbers from previous example. What could be the problem here? Kind regards, Sergey