Graphics, Figures & TablesTikZ error message

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mark999
Posts: 4
Joined: Mon Mar 08, 2010 12:32 am

TikZ error message

Post by mark999 »

Hello, I've recently started trying to use TikZ, and I'm having trouble getting some of the examples in the TikZ manual to work. I'm using MiKTeX 2.8.

This example from p. 476 of the manual

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[scale=.5]
  \datavisualization [school book plot,smooth]
  data [format=function] {
    var x : interval [-2:2];
    func y = \value x*\value x;
  };
\end{tikzpicture}

\end{document}
gives this error:

Code: Select all

! Undefined control sequence.
l.10   \datavisualization
                          [school book plot,smooth]
? 
However, this earlier example works:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture} [scale = 3]
  \clip (-0.1, -0.2) rectangle (1.1, 0.75);
  \draw (-1.5, 0) -- (1.5, 0);
  \draw (0, -1.5) -- (0, 1.5);
  \draw (0,0) circle (1cm);
  \draw[step = 0.5 cm, gray, very thin] (-1.4, -1.4) grid (1.4, 1.4);
  \draw (3mm, 0mm) arc (0:30:3mm);
\end{tikzpicture}

\end{document}
I don't know if I installed TikZ properly. I don't know how to manually install packages so I installed TikZ by running some examples from the TikZ examples page and letting the automatic installer install the required packages.

Thank you for any help you can give.

Mark

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

TikZ error message

Post by gmedina »

Hi,
mark999 wrote:...This example from p. 476 of the manual

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[scale=.5]
  \datavisualization [school book plot,smooth]
  data [format=function] {
    var x : interval [-2:2];
    func y = \value x*\value x;
  };
\end{tikzpicture}

\end{document}
I couldn't find that example on the PGF/TikZ manual. Where did you take it from?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
mark999
Posts: 4
Joined: Mon Mar 08, 2010 12:32 am

Re: TikZ error message

Post by mark999 »

That example is on page 476 of the version of the PGF/TikZ manual that I have saved on my computer. The manual I have is dated February 12, 2010, and has 726 pages. The manual you linked to is dated February 20, 2008, and has 560 pages.

However, I can't remember where I got the manual from.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

TikZ error message

Post by localghost »

Obviously you have read the manual of an unofficial CVS build [1]. But you are still using the latest stable version 2.00 of pgf/tikZ. This can't work unless you install also the corresponding package file.

[1] TeXample.net - TikZ and PGF builds


Best regards and welcome to the board
Thorsten
mark999
Posts: 4
Joined: Mon Mar 08, 2010 12:32 am

Re: TikZ error message

Post by mark999 »

Thank you very much Thorsten.
Post Reply