\begin{axis}[ xlabel={$X_x$}, ylabel={diff}, legend pos=north west, grid=both, axis y…
- User
\begin{axis}[ xlabel={}, ylabel={diff}, legend pos=north west, grid=both, axis y line*=left, ] \addplot[color=blue, mark=none] table[x=X_x,y=value,col sep=comma] {visu/tikz_csv/result_soln_test_trajectory/one_dim/#1/diff.csv}; \legend{diff} \end{axis} gives the error Package pgfplots Error: Could not read table file 'visu/tikz_csv/result_soln_test_trajectory/one_dim/0/diff.csv' in 'search path=.'. In case you intended to provide inline data: maybe TeX screwed up your end-of-lines? Try
row sep=crcr' and terminate your lines with\' (refer to the pgfplotstable manual for details) But it works in other cases Assistant
The error you are encountering is due to the
pgfplotspackage being unable to read the table filediff.csvin the specified path. To resolve this issue, you can try the following steps:- Make sure that the file
diff.csvexists in the correct path. - Check if the file name and extension are correct.
- Ensure that the file is not empty and contains valid data.
If the issue still persists, you can try reading the table data inline in the LaTeX document instead of using an external file. Here's an example of how to do this:
\begin{axis}[ xlabel={$X_x$}, ylabel={diff}, legend pos=north west, grid=both, axis y line*=left, ] \addplot[ color=blue, mark=none, table={ X_x value 0.1 1.2 0.2 2.3 0.3 3.4 % add more data points here } ]{}; \legend{diff} \end{axis}Replace the table data with your actual data points. This should resolve the error and allow you to plot the data without reading from an external file.
- Make sure that the file