79578141

Date: 2025-04-16 21:31:49
Score: 3
Natty:
Report link

Installation worked out of the box: sudo apt install gnuplot-qt. I decided to use the qt version, since I am also very happy with the Python/Matplotlib backend QtAgg (see https://matplotlib.org/stable/users/explain/figure/backends.html)

Calling gnuplot from LaTeX worked also out of the box. In TexStudio / Options / Configure TexStudio... I use pdflatex -synctex=1 -shell-escape -interaction=nonstopmode %.tex.

\begin{tikzpicture}
\begin{axis}[
   xmin=-pi, xmax=pi,
   ymin=-2, ymax=2,
   title=Sine Wave,
   legend pos=south east, legend style={draw=none},
]
% gnuplot script inside brackets {}
\addplot gnuplot[raw gnuplot, id=sin,mark=none,color=violet] {plot sin(x)};
\addlegendentry{sin(x)}
\end{axis}
\end{tikzpicture}

Thank you for your help.

Best regards, philipp

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (0.5): Best regards
  • Blacklisted phrase (1): regards
  • Whitelisted phrase (-0.5): Thank you for your help
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: philipp