2

I just downloaded and ran the gnuplot setup exe. Now, how do I setup TeXnicCenter and gnuplot so I can use gnuplot with TikZ?

So I have been able to add --enable-write18 but the inverted cycloid doesn't generate when I compile.

I keep receiving the error pgf warning:

plot data file '211*Homework*8.pgf-plot.table' not found.

I have uninstalled and re-installed gnuplots. I created the environment variable gnuplots located in the bin folder. I have a file in there named gnuplots.exe but there is also a pgnuplots.exe. If I rename pgnu, it will ask me to replace the gnu or rename it. I have tried putting gnuplots.exe on the desktop and renaming pgnuplots. I have edited command line arguments for Latex to PDf to -synctex=-1 -max-print-line=120 -interaction=nonstopmode "%wm" --enable-write18 (and I have tried -shell-escape). Where the above error occurs no matter what

Does anyone actually know how to set gnuplots up in TexnicCenter with MiKTeX for Windows 7 64bit? If so, can you walk through each piece line by line. By that I mean, environment variable name, should pgnuplot in bin be renamed and replace gnuplot, command line argument for Latex to PDF, and whatever else is missing to rectify the plot data file not found.

\documentclass[11pt]{article}

\usepackage{tikz, tikz-qtree, pgfplots, tikz-3dplot}
\usepackage[miktex]{gnuplottex}

\usetikzlibrary{arrows,decorations.markings,calc,fadings,decorations.pathreplacing, patterns, decorations.pathmorphing, positioning}
 \allsectionsfont{\sffamily\raggedright\underline} 
 \begin{document}
 \begin{tikzpicture}[line join = round, line cap = round, >=triangle 45]
 \draw[->] (0,0) -- (6.2,0);
 \foreach \x in {0,1,2,3,4,5,6}
 \draw[shift = {(\x,0)}, color = black] (0pt,2pt) -- (0pt,-2pt) node[below]    {\footnotesize $\x$};
 \draw[<-] (0,-2) -- (0,0);
 \foreach \y in {0,-1}
 \draw[shift = {(0,\y)}] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
 \draw (0pt,-10pt) node[fill = white] {\footnotesize $0$};
 \clip(0,-2) rectangle (6.2,0);
 \draw[smooth, samples = 100, domain = 0:6.28319] plot[parametric] function{t - sin((t)*180/pi), -1 + cos((t)*180/pi)};
 \end{tikzpicture}
 \end{document}
6
  • Gnuplot and PDFLatex question Commented Mar 16, 2013 at 20:42
  • I added \usepackage[miktex]{gnuplottex} but I am getting the following error: shell escape not enabled
    – dustin
    Commented Mar 16, 2013 at 20:53
  • just add --enable-write18 option to pdflatex in TeXniccenter configuration see this. Commented Mar 16, 2013 at 20:57
  • How do I do it permanently enable write 18 in latex? I don't fully understand the instructions. Must it be done in ever document?
    – dustin
    Commented Mar 16, 2013 at 21:01
  • see this texniccenter screenshot. I don't use texniccenter. if you are free you can come to chat Commented Mar 16, 2013 at 21:09

1 Answer 1

4

I don't use gnuplottex but I have enabled the --shell-escape option as the following

enter image description here

In the second command box I have the following setting:

-synctex=-1 -max-print-line=120 -interaction=nonstopmode "%wm" -shell-escape

and that should be enough for your MWE.

Your code with the following lines commented out

\usepackage[miktex]{gnuplottex}
\allsectionsfont{\sffamily\raggedright\underline} 

I get the following picture

enter image description here

4
  • i was about to compose the answer from the chat discussion with the OP. Commented Mar 16, 2013 at 23:34
  • I still keep receiving the error pgf warning: plot data file '211*Homework*8.pgf-plot.table' not found. Also, that code shouldn't generate that. It would generate a cycloid on the negative since that is the how the function is defined.
    – dustin
    Commented Mar 16, 2013 at 23:41
  • @texenthusiast I can delete this if you wish it's kind of a generic answer. Sorry about that.
    – percusse
    Commented Mar 17, 2013 at 3:09
  • no worries, your answer is simply the concise form of what we discussed at chat. as discussed in chat @dustin post a new question with your expected pdf result look like since plot parametric not functioning according to your expectations. give this question as reference incase required as you are able to compile to pdf. Commented Mar 17, 2013 at 5:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .