Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I just received a new macbook OS 10.8 Mountain Lion and I have installed TeXmaker, MacTex, MacPorts and gnuplot. I compiled a LateX file that uses TikZ and gnuplot and got the following error in the logfile. TeXMaker also stalls after the compile attempt and a force quit is required to close the app.

Versions: TeXMaker 4.0.2 Gnuplot 4.6 patchlevel 3

Package gnuplottex Warning: Shell escape not enabled. 
You'll need to convert the graphs yourself..

I have already added the following to the TeXmaker preferences:

pdflatex:
"/usr/texbin/pdflatex" --shell-escape --enable-write 18 -synctex=1 -interaction=nonstopmode %.tex

So I tried adding gnuplot to my PATH

echo $PATH 

says:

/opt/local/sbin:/opt/local/sbin:/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/opt/local/bin/gnuplot:/opt/local/bin/ports

I tried running the following example in TeXworks and got the same plot error.

%& -shell-escape
% Source: The PGF/TikZ manual
\documentclass{article}

\usepackage[latin1]{inputenc}
\usepackage{tikz}

% GNUPLOT required
\begin{document}
\pagestyle{empty}


\begin{tikzpicture}[domain=0:4]
\draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);
\draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};
\draw[->] (0,-1.2) -- (0,4.2) node[above] {$f(x)$};
\draw[color=red] plot[id=x] function{x} 
    node[right] {$f(x) =x$};
\draw[color=blue] plot[id=sin] function{sin(x)} 
    node[right] {$f(x) = \sin x$};
\draw[color=orange] plot[id=exp] function{0.05*exp(x)} 
    node[right] {$f(x) = \frac{1}{20} \mathrm e^x$};
\end{tikzpicture}

Errors:

Warning/error below, the plot looks empty. Yes, I have gnuplot installed. 
Package pgf Warning: Plot data file 'test2.x.table' not found. on input line
Package pgf Warning: Plot data file 'test2.sin.table' not found. on input line
Package pgf Warning: Plot data file 'test2.exp.table' not found. on input line

.log file for running on TeXMaker:

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012) (format=pdflatex     2012.6.30) 16 MAY 2013 23:28
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation,  ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus,  arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal,  nynorsk,
polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s
lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian,
welsh, loaded.
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option) 
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2012/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty
Package: gnuplottex 2011/09/12 v0.4.4 gnuplot graphs in LaTeX
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/latexsym.sty
Package: latexsym 1998/08/17 v2.2e Standard LaTeX package (lasy symbols)
\symlasy=\mathgroup4
LaTeX Font Info: Overwriting symbol font `lasy' in version `bold'
(Font) U/lasy/m/n --> U/lasy/b/n on input line 47.
)
(/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14 
) 
(/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
(/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
(/usr/local/texlive/2012/texmf-dist/tex/latex/latexconfig/graphics.cfg
File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live  
)
Package graphics Info: Driver file: pdftex.def on input line 91.
(/usr/local/texlive/2012/texmf-dist/tex/latex/pdftex-def/pdftex.def
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
) 
(/usr/local/texlive/2012/texmf-dist/tex/latex/moreverb/moreverb.sty
Package: moreverb 2008/06/03 v2.3a `more' verbatim facilities
(/usr/local/texlive/2012/texmf-dist/tex/latex/tools/verbatim.sty
Package: verbatim 2003/08/22 v1.5q LaTeX2e package for verbatim enhancements
\every@verbatim=\toks15
\verbatim@line=\toks16
\verbatim@in@stream=\read1
)
\tab@position=\count88
\tab@size=\count89
\listing@line=\count90
)
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
)
\verbatim@out=\write3
runsystem(echo t > "w18-test-20135161408")...executed.
runsystem(del "w18-test-20135161408")...executed.
Package gnuplottex Warning: Shell escape not enabled.
(gnuplottex) You'll need to convert the graphs yourself..
\c@fignum=\count91
) (./test.aux)
\openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6. 
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
(/usr/local/texlive/2012/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen105
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks17
\MPscratchCnt=\count95
\MPscratchDim=\dimen106
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks18
) (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX     (HO
)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/local/texlive/2012/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
(/usr/local/texlive/2012/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
))
(/usr/local/texlive/2012/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 452.
(/usr/local/texlive/2012/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX       Liv
e
))
\openout3 = `test-gnuplottex-fig1.gnuplot'.
Opening gnuplot stream test-gnuplottex-fig1.gnuplot
Package gnuplottex Warning: Please convert test-gnuplottex-fig1.gnuplot     manuall
y.
\openout3 = `test-gnuplottex-fig2.gnuplot'.
Opening gnuplot stream test-gnuplottex-fig2.gnuplot
Package gnuplottex Warning: Please convert test-gnuplottex-fig2.gnuplot    manuall
y.
(./test.aux) )
Here is how much of TeX's memory you used:
1637 strings out of 493488
24017 string characters out of 3141326
75347 words of memory out of 3000000
4946 multiletter control sequences out of 15000+200000
3640 words of font info for 14 fonts, out of 3000000 for 9000
957 hyphenation exceptions out of 8191
37i,1n,23p,237b,70s stack positions out of 5000i,500n,10000p,200000b,50000s
No pages of output.
PDF statistics:
0 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
share|improve this question
    
welcome to tex.sx. You can format code sections by indenting by 4 spaces (or highlight then use the {} button. Inline code can be marked with backticks: abc. –  David Carlisle May 15 '13 at 23:47
1  
-enable-write 18 should be -enable-write-18 with no space but it's the same thing as -shell-escape which you already have except it should have one - not two. does it work if you use that command directly on the terminal? Also are you sure texmaker is using pdflatex rather than (say) latex. What does the start or end of the log file say? (I don't have a mac so can't be too specific:-) –  David Carlisle May 16 '13 at 0:05
    
Related question Gnuplot and PDFLatex question –  texenthusiast May 16 '13 at 0:19
    
I added the file I tried to compile above. It compiles now but the plots are empty. Should I post the whole log file? –  kjhudson May 17 '13 at 3:26
    
@kjhudson did the process make a file with the suffix .table? –  dustin May 17 '13 at 3:26

1 Answer 1

I read your log file and it says you need to make the files manually.

I ran a test on my system since I haven't used gnuplot in a bit. I ran latex and the .gnuplot file was created like in your case.

Next, I ran in the terminal gnuplot /path/to/.gnuplot file(s). From here, gnuplot created two .tex files. When I used another system, it created table files. Upon reading the manual, it may produce depending on your system and settings eps, png, tex, table, and some others.

If it creates one of the files that can be used in includgraphics, you can do that. If you get .tex files, run latex again and the plots will appear. If you get a table, run latex again and the plots will appear.

share|improve this answer
    
Thank you for that tip! This problem only occurred when switching to my new computer. This worked fine on my older mac and I never had to compile the gnuplots my self. The only difference is moving from 10.5 operating system to 10.8 as well as newer versions {MacTex} and {gnuplot}. This would mean that all the documents I have written the past year an a half now have plots compiled by hand. That can't be right. I also don't know how to do that so I would you be so kind to step me through this so I can use it as a last resort that would be appreciated. –  kjhudson May 17 '13 at 12:48
    
@kjhudson open the .gnuplot in gnuplot and run it. Once you open it in gnu, you should be easy to figure out. The files you have done before already have .tables so those are fine. You can using latexmk which runs pdflatex the appropriate amount of times to shore up issues like this. For instance, you run latexmk it generates the gnuplot and then runs again since it needs the table. –  dustin May 17 '13 at 15:15
    
Ok, so I briefly saw this in the messages/log while the file was compiling: {sh : gnuplot command not found}. But when I type gnuplot into the terminal it runs. Also having trouble highlighting within the comments. –  kjhudson May 17 '13 at 15:29
    
@kjhudson until you figure out how to get your latex setup to recognize gnuplot, you may have to do it manual which isn't that hard. Did you open your gnuplot files in gnuplot and generate the table? If so, run latex again. –  dustin May 17 '13 at 15:33
    
In the terminal, I went to the folder where the .gnuplot file existed and typed in the file name. I got an error saying invalid command. How to I run the file? –  kjhudson May 17 '13 at 15:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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