Возникла проблема с использованием
cnuplot в
LaTeX. После компиляции возникает ошибка:
1)Package pgfplots Error: Sorry, the gnuplot-result file 'Nonlinear_Approximatike '>> gnuplot <file>.gnuplot' manually on the respective gnuplot file.. };
2)running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing \pgfplotsset{compat=1.14} into your preamble.
3)Overwriting file `./data.csv'.
Пример кода:
\documentclass{report}
\usepackage{siunitx}
\usepackage{pgfplots}
\usepackage{filecontents}
\begin{filecontents}{data.csv}
3000 1.2970e+00 0.198956 0.258046
3100 8.6050e-01 0.18747 0.161318
3200 5.7970e-01 0.172414 0.0999484
3300 3.9770e-01 0.147098 0.0585009
3400 2.7720e-01 0.128355 0.03558
3500 1.9700e-01 0.139395 0.0274608
3600 1.4310e-01 0.0867237 0.0124102
3700 1.0600e-01 0.0865613 0.0091755
3800 7.9990e-02 0.0509629 0.00407652
3900 6.1560e-02 0.0501454 0.00308695
4000 4.8010e-02 0.0249455 0.00119763
\end{filecontents}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
/pgf/number format/set thousands separator = {},
xlabel = Mass $\Omega$,
ylabel = $\sigma*\mathcal{A}(\si{\pico\barn})$,
]
\addplot [only marks, black] table[x index=0,y index=3,header=false] {data.csv};
\addplot [no markers, red] gnuplot [raw gnuplot] { % "raw gnuplot" allows us to use arbitrary gnuplot commands
f(x) = a*exp(b*x); % Define the function to fit
a=1; b=-0.001; % Set reasonable starting values here
fit f(x) 'data.csv' u 1:4 via a,b; % Select the file, the columns (indexing starts at 1) and the variables
plot [x=3000:4000] f(x); % Specify the range to plot
};
\legend{$\sigma_{\text{MC}}$}
\end{axis}
\end{tikzpicture}
\end{document}
У меня стоит:
windows 8.1
TeXLive
TeXstudio
gnuplot