1

When trying to run the example code below found at How to draw a square wave?, I get the error: "LaTeX Error: File `gnuplot3-gnuplottex-fig1' not found", although I am seeing the eps file created in my folder.

I followed the steps found here to include the --shell-escape in the PDFLaTeX option in WinEdt. I still have the error. I am however able to run other simple gnuplot code like that found here.

Can you tell me why I am getting this error although the eps file is created? Thanks.

Here is the original code:

% Code compiled with pdflatex engine via frozen texlive 2012 on Linux 
% Need "-shell-escape" enabled and gnuplot 4.4 
\documentclass[preview=true,12pt]{standalone}
\usepackage{gnuplottex} % http://www.ctan.org/pkg/gnuplottex
\begin{document} 
\begin{gnuplot}[terminal=epslatex,terminaloptions=color]
# xy co-ordinates range
xmin=-19;xmax=6;ymin=-1;ymax=1;
unset border   # border off
unset xtics    # remove xaxis tics
set ytics ("0" -1, "0.5" 0, "1" 1) nomirror  # remove rightside yaxis ticks
set samples 300  # number of sample points
set arrow from xmin,ymin to xmax,ymin linewidth 1.5 # x-axis 
set arrow from xmin+0.15,ymin to xmin+0.15,ymax+0.2 linewidth 1.5 # y-axis 
set arrow from -5,ymin-0.1 to -3,ymin-0.1 # Time arrow
set title 'Square wave'
set xlabel "Time" 
set ylabel "Amplitude"  
# based on "Other definitions" at http://en.wikipedia.org/wiki/Square_wave
plot [xmin:xmax] [ymin:ymax] sgn(sin(x)) linecolor 3 linewidth 3  notitle;
\end{gnuplot}
\end{document}
1

If you run pdflatex or equivalent to generate PDF directly, it won't include PS (or EPS, for that matter). Formats acceptable are PDF, PNG, JPEG.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.