Any ideas?
Many thanks in advance,
Geoff.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw plot (\x,\x);
\end{tikzpicture}
\end{document}
pgf & tikz uses gnuplot to provide some data for a plot. So you need
1) to have gnuplot installed
2) run (pdf)latex with --shell-escape switch enabling \write18 to
summon gnuplot to provide this data.
You missing nothing in preamble
HTH
I got a straight line at 45 degrees, length: 100mm x sqrt(2)
>
> pgf & tikz uses gnuplot to provide some data for a plot. So you need
> 1) to have gnuplot installed
> 2) run (pdf)latex with --shell-escape switch enabling \write18 to
> summon gnuplot to provide this data.
>
> You missing nothing in preamble
Hi,
No pgf/tikz can plot with gnuplot or without it
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}%[domain=0:4]
\draw[color=red] plot (\x,\x) ;
\end{tikzpicture}
\end{document}
With this code, (see page 195 the pgfmanual) TikZ can
plot without gnuplot
with gnuplot the code is
\begin{tikzpicture}[domain=0:4]
\draw[color=red] plot[id=x] function{x} node[right] {$f(x) =x$};
\end{tikzpicture}
It's better to give a domain but initially the values of \x are between
-5 and 5
Best Regards
Alain
I'm glad it worked straight up for you, that's what I was expecting
too. All previous copy/paste examples worked too. I am also using
MikTeX on windows.
-------------------------------------
The error is:
! Package tikz Error: Cannot parse this plotting data.
See the tikz package documentation for explanation.
l.9 \draw plot (
\x,\x);
--------------------------------------
So I still can't see what the problem is!
I realised, thanks to K.Starks message, that perhaps I needed to
update my Miktex. Lo and behold, it works.
Thanks for the help and time given, sorry for being an inconvenience.
Geoff.
You're very welcome.
Ken