I'm trying to create a gnuplot image inside my LaTeX document, but nothing is being displayed.
My gnuplot works if I do it outside LaTeX.
\begin{figure}[!ht]
\begin{gnuplot}[terminal=pdf, terminaloptions=color, scale=0.9]
set title 'Laptop Steps'
set datafile separator ','
set xlabel 'Query'
set ylabel 'Average time in ms(100 executions)'
set xrange [0:21]
set xtics 1,1,20
set logscale y
set grid ytics lt 0 lw 1 lc rgb '#bbbbbb'
set grid xtics lt 0 lw 1 lc rgb '#bbbbbb'
set key samplen 2 spacing .5 font ',8'
show grid
set style fill solid 0.8 border -1
set boxwidth 0.5 relative
plot for [i=1:14] 'benchmarks/basex-steps-laptop-transposed.csv' u (\$0+1):i title ''.i.'00 kb' with linespoints
\end{gnuplot}
\end{figure}
I'm using vim with the latex plugin.
The structure of my project is:
main
|-chapters/the-file-with-the-gnuplot-code
|-benchmarks/benchmark-file.csv
For gnuplot I have this in my document:
\usepackage{gnuplottex}
\usepackage{epstopdf}
I only get the warning:
Package gnuplottex Warning: Please convert thesis-gnuplottex-fig1.gnuplot manually
Does anyone have an idea what I'm doing wrong?
Best Answer
If you run
gnuplot <basename>-gnuplottex-fig1.gnuplot
, you'll seegnuplot
's error messagegnuplot
is stumbling over the\$
. You don't need to escape the dollar sign in agnuplot
environment. If you remove the backslash, everything should work.