Graphics, Figures & Tables ⇒ How can I draw plots in LaTeX?
Re: latex,gnuplot
Is there a way, that I can check in latex if gnuplot is innstaled?(if latex "knows" for gnuplot)?
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: latex,gnuplot
I now uninstall gnuplot, and I get the same picture. So latex is not connected with gnuplot.
Does anybody have idea why this is happening?
Does anybody have idea why this is happening?
Re: latex,gnuplot
Since there is apparently no one with similar problems, does somebody have any ideals what else can I change or look, or where to ask to fix this?
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
How can I draw plots in LaTeX?
You tried the alternative way withditka wrote:Since there is apparently no one with similar problems, does somebody have any ideals what else can I change or look, or where to ask to fix this?

Stefan
LaTeX.org admin
Re: latex,gnuplot
Yes, pgf also needs gnuplot, and I think it is more efficient drawing graphs with gnuplot that pgf.
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
How can I draw plots in LaTeX?
No, pgf does not need gnuplot to produce plots. I quite routinely use pgfplots to create plots for work, no gnuplot involved at all.
Joseph Wright
Re: latex,gnuplot
Yes I know some functions can be done without it, but when you want to draw graphs it is probably better if you use gnuplot.
Re: latex,gnuplot
I think latex is just not able to conect with gnuplot, and I dont have idea why.
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
How can I draw plots in LaTeX?
I agree with Joseph: pgfplots doesn't need gnuplot. That makes it easier to use. Simple example, which I posted recently on matheplanet.com:ditka wrote:Yes, pgf also needs gnuplot
Code: Select all
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis x line=middle, axis y line=middle]
\addplot[domain=0:5, samples=100, smooth] {1/sqrt(x)};
\end{axis}
\end{tikzpicture}
\end{document}
In the calculation during compilation, this may be true, though one may think about how efficient it is to call an external program many times, at each place where a plot is, producing another auxiliary file each. But for the final pdf it doesn't matter, once it's compiled.ditka wrote:I think it is more efficient drawing graphs with gnuplot that pgf.
This depends on what you define is better. I think it's better, to have a native LaTeX package which perfectly integrates with your document, regarding preamble settings and styles, such as consistency regarding font style and size and math mode in axis labels and the main text.ditka wrote:Yes I know some functions can be done without it, but when you want to draw graphs it is probably better if you use gnuplot.
If compilation speed is so important that it's more worth than style consistency, or if gnuplot offers a feature which pgfplots doesn't, well, use it. But then it's a challenge for less experienced users to get it running.
Perhaps tell us reasons why gnuplot may be better, I'm interested to know. You already mentioned efficiency (though I guess you mean speed, but not disk space, plot data files cost space with gnuplot).
Stefan
LaTeX.org admin
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
How can I draw plots in LaTeX?
This can be an operating system issue. LaTeX just calls "gnuplot", so it has to be installed so that it can be called. For example, the executable file of gnuplot has to be in the PATH environment variable of Windows, where programs are searched. Test at the command prompt: call gnuplot at the command prompt (cmd). If it doesn't start there, then also LaTeX doesn't have a chance to find it.ditka wrote:I think latex is just not able to conect with gnuplot, and I dont have idea why.
Stefan
LaTeX.org admin