I have been trying to make LaTeX plot directly as it compiles the pdf but it always turns out to require me to go to the terminal and process the .gnuplot file that the compilation produces, which is horribly time-consuming. Is there anyway of including the plot in the compilation of the pdf?
I am using Mac OS X 10.10.2 and writing in TeXShop. My code so far is
\usepackage{graphicx}
\usepackage{gnuplottex}
\begin{figure}[h!]
\centering
\begin{gnuplot}[terminal=cairolatex,terminaloptions=color]
set ylabel "y"
plot [0:2*pi] sin(x) title 'Sine', cos(x) title 'Cosine'
\end{gnuplot}
\end{figure}
This produces a filename.gnuplot file but no figure in the .pdf. After I use the terminal ( typing "gnuplot filename.gnuplot"), and compile the LaTeX again the graphs shows up.
Thank you!