TransWikia.com

pgfplots Error when trying to read a copy of a .csv file that works if not renamed

TeX - LaTeX Asked by Barefoot_fiki on November 6, 2021

I’m writing my thesis and this is the first time, I’ve ever encountered this kind of problem. So, I’m constantly working with csv files, with no problem. Yesterday, this started to happen:

This block of code works:

begin{tikzpicture}
    begin{axis}[
        y label style={at={(0.05,0.5)}},
        ylabel = Force (kN),
        xlabel = Deflection (mm),
        legend style={at={(0.5,-0.2)},anchor=north},
        legend columns=3,%transpose legend,
        legend cell align={left},
    ]
        addplot[solid, thick] table[x=x,y=TA1, col sep=comma,smooth,mark=none] {pics/01/HAK.csv};
        addlegendentry{$d_r = 1.5%$};
        addplot[thick, dashed] table[x=x,y=TA2, col sep=comma,smooth,mark=none] {pics/01/HAK.csv};
        addlegendentry{$d_r = 2.5%$};
        addplot[thick, dashdotted] table[x=x,y=TA3, col sep=comma,smooth,mark=none] {pics/01/HAK.csv};
        addlegendentry{$d_r = 1.0%$};
    end{axis}
end{tikzpicture}

If I copy the "HAK.csv" file (same directory, same everything), and just rename it into anything, e.g. "bbbb.csv"

begin{tikzpicture}
    begin{axis}[
        y label style={at={(0.05,0.5)}},
        ylabel=Force (kN),
        xlabel=Deflection (mm),
        legend style={at={(0.5,-0.2)},anchor=north},
        legend columns=3,%transpose legend,
        legend cell align={left},
    ]
        addplot[solid, thick] table[x=x,y=TA1, col sep=comma,smooth,mark=none] {pics/01/bbbb.csv};
        addlegendentry{$d_r = 1.5%$};
        addplot[thick, dashed] table[x=x,y=TA2, col sep=comma,smooth,mark=none] {pics/01/HAK.csv};
        addlegendentry{$d_r = 2.5%$};
        addplot[thick, dashdotted] table[x=x,y=TA3, col sep=comma,smooth,mark=none] {pics/01/HAK.csv};
        addlegendentry{$d_r = 1.0%$};
    end{axis}
end{tikzpicture}

I get an error:

! Package pgfplots Error: Could not read table file ‘pics/01/bbbb.csv’ in ‘sear
ch path=.’. In case you intended to provide inline data: maybe TeX screwed up y
our end-of-lines? Try row sep=crcr' and terminate your lines with ‘ (refer
to the pgfplotstable manual for details).

I’m stuck and can’t get an idea how to handel this, as it works until it is renamed.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP