Graphics, Figures & Tables ⇒ How can I draw plots in LaTeX?
Re: latex,gnuplot
I have done that, I can call gnuplot from command line, gnuplot itself also work, I also tried with older versions og gnuplot.
Nothing of that didnt help.
Nothing of that didnt help.
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: latex,gnuplot
Well, I think pgf have its qualities and gnuplot has its own.
Probably not calling external program is good advantage, but there are also other parameters.
And I think I could use gnuplot, but I just cant find what is wrong. As I mentioned before, I get the identically same result, using either PCTeX or MIKTeX, so it must be something with gnuplot, ot its connection with latex.
I alredy post log file from both editors, but they didnt show exactly where the problem is.
I also look at all requirements, that I found on the web page with example and I think I have manage to satisfy them all.
So, I please if somebody(using windows, and latest wersionon of gnuplot ) can tell me how its output look like.(like did Stefan in the second post) so I can see is there something wrong with using this code in widows or is the problem in my computer.
And I also please if somebody has any idea what else can I check or where to look to find solution.
Probably not calling external program is good advantage, but there are also other parameters.
And I think I could use gnuplot, but I just cant find what is wrong. As I mentioned before, I get the identically same result, using either PCTeX or MIKTeX, so it must be something with gnuplot, ot its connection with latex.
I alredy post log file from both editors, but they didnt show exactly where the problem is.
I also look at all requirements, that I found on the web page with example and I think I have manage to satisfy them all.
So, I please if somebody(using windows, and latest wersionon of gnuplot ) can tell me how its output look like.(like did Stefan in the second post) so I can see is there something wrong with using this code in widows or is the problem in my computer.
And I also please if somebody has any idea what else can I check or where to look to find solution.
Re: latex,gnuplot
I have now try unninstal gnplot and I still get the same picture.
I have read post under the graph(on the original page with istructons for picture) that something in the file pgfmodule.code need to be changed. I have attach the file, here, if anaybody have any suggestion what can I change here.
I have read post under the graph(on the original page with istructons for picture) that something in the file pgfmodule.code need to be changed. I have attach the file, here, if anaybody have any suggestion what can I change here.
- Attachments
-
- dsd.pdf
- (121.28 KiB) Downloaded 585 times
Re: latex,gnuplot
Can please somebody that can use gnuplot in latex post his pgfmodule.code file?
How can I draw plots in LaTeX?
If you want to use gnuplot with LaTeX, I'd recommend using them as separate programs instead of trying to call gnuplot directly from LaTeX. Gnuplot has two terminal types which produce LaTeX-friendly output: epslatex and lua. Both of those draw only the graphics parts and leave the text rendering to LaTeX, so that you can get the same fonts (both normal and math mode) on the plots as in the rest of your document. See here for an example of using the epslatex terminal in gnuplot, and see here for an example of using the lua terminal for inclusion in TikZ environments.
How can I draw plots in LaTeX?
After I use the folowig example I get:
! Package pgfplots Error: Sorry, the gnuplot-result file 'ffgsffsfsfs.pgf-plot.
table' could not be found. Maybe you need to enable the shell-escape feature? F
or pdflatex, this is '>> pdflatex -shell-escape'. You can also invoke '>> gnupl
ot <file>.gnuplot' manually on the respective gnuplot file..
See the pgfplots package documentation for explanation.
Type H <return> for immediate help.
error.
Why is better using gnuplot as two separate progrmas?
Code: Select all
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
xlabel={x},
ylabel={$\left(\frac{\sin(x)}{x}\right)^2$},
xmin=-10,xmax=10,ymin=0,ymax=1,
xtick={-10,-5,...,10},
ytick={0,0.2,...,1}
]
\addplot[domain=-10:10,samples=100] gnuplot {(sin(x)/x)**2};
\end{axis}
\end{tikzpicture}
\end{document}
table' could not be found. Maybe you need to enable the shell-escape feature? F
or pdflatex, this is '>> pdflatex -shell-escape'. You can also invoke '>> gnupl
ot <file>.gnuplot' manually on the respective gnuplot file..
See the pgfplots package documentation for explanation.
Type H <return> for immediate help.
error.
Why is better using gnuplot as two separate progrmas?
How can I draw plots in LaTeX?
It runs flawless for me. Did you run it with »shell-escape« enabled?ditka wrote:Code: Select all
! Package pgfplots Error: Sorry, the gnuplot-result file 'ffgsffsfsfs.pgf-plot. table' could not be found. Maybe you need to enable the shell-escape feature? F or pdflatex, this is '>> pdflatex -shell-escape'. You can also invoke '>> gnupl ot <file>.gnuplot' manually on the respective gnuplot file.. See the pgfplots package documentation for explanation. Type H <return> for immediate help. error.
site moderator & package author
Re: latex,gnuplot
Yes, I did. Like I said in previus posts it looks like latex cant contet to external programs.
How can I draw plots in LaTeX?
For precisely the reason you're having trouble trying to use them together.ditka wrote:Why is better using gnuplot as two separate progrmas?

It's just much easier to use gnuplot and LaTeX separately. Another advantage is that for large documents you don't have to wait a long time for the LaTeX compilation to end to see what the plot will look like; you could just run gnuplot separately and immediately see how the plot looks.
How can I draw plots in LaTeX?
Well, that depends... for the example above I had to hit one (!) button only. Can't get much easier than that…shadgrind wrote:It's just much easier to use gnuplot and LaTeX separately.

That's why I always have a second file (usuallyshadgrind wrote:Another advantage is that for large documents you don't have to wait a long time for the LaTeX compilation to end to see what the plot will look like; you could just run gnuplot separately and immediately see how the plot looks.
test.tex
) opened in my editor. No need to compile the whole document. 
site moderator & package author