larskotthoff / gnuplottex

Gnuplot graphs in LaTeX. See http://www.ctan.org/pkg/gnuplottex
3 stars 1 forks source link

not working for data from a file #22

Closed dflvunoooooo closed 7 months ago

dflvunoooooo commented 7 months ago

Latex reports system returned with code 256 and is raising a waring if I try to plot data from a file. Of cause there is no figure in the created in the latex pdf. The code seems to be converted properly in the .gnuplot file. There is no cleated pdf of the plot and the .tex plot file is empty. The code is working perfectly if run directly with gnuplot.

The waring is not helpful, it says Gnuplot execution produced errors:plot 'Versuch_4_5_Gruppe_N_am_01_12_2023.dat' every 1::13::524 using 3:($6/$5). The latex code is:

\documentclass{scrreport}

\usepackage[siunitx, subfolder]{gnuplottex}

\begin{document}

\begin{figure}
    \centering
    \begin{gnuplot}[terminal=cairolatex, terminaloptions=color]

        plot 'Versuch_4_5_Gruppe_N_am_01_12_2023.dat' every 1::13::524 using 3:($6/$5)
    \end{gnuplot}
    \caption{This is a simple example using the cairolatex-terminal.}
    \label{pic:cairolatex}
\end{figure}

\end{document}
larskotthoff commented 7 months ago

Can you provide the contents of the file please?

dflvunoooooo commented 7 months ago

Of cause. It is a .dat file, but I am only allowed to upload .txt files, so I changed the ending.

Versuch_4_5_Gruppe_N_am_01_12_2023.txt

larskotthoff commented 7 months ago

Thanks. After the error message you give, I get

all points y value undefined!

I get exactly the same error when I run it in gnuplot directly, so it doesn't seem to be related to gnuplottex.

dflvunoooooo commented 7 months ago

You are right. The problem was a missing set decimalsign locale "de_DE.UTF-8" at the beginning to toll gnuplot to use a , as decimal seperator. Thank you for your assistance.