# TikZ failing to draw [closed]

I'm trying to use TikZ to make flow charts in my LaTeX files, but I'm getting an error. Here's the LaTeX I'm using:

\documentclass[11pt]{article}
\usepackage{tikz}

\begin{document}
Some text
\tikzstyle{decision} = [diamond, draw, fill=blue!20, text width=4.5em, text badly centered, node distance=2.5cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=5em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, very thick, color=black!50, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=2.5cm, minimum height=2em]

\begin{tikzpicture}[scale = 2, node distance = 2cm, auto]
\node [block] (init) {initialize model};
\node [cloud, left of=init] (expert) {expert};
\node [cloud, right of=init] (system) {system};
\node [block, below of=init] (identify) {identify candidate models};
\node [block, below of=identify] (evaluate) {evaluate candidate models};
\node [block, left of=evaluate, node distance=3cm] (update) {update model};
\node [decision, below of=evaluate] (decide) {is best candidate better?};
\node [block, below of=decide, node distance=3cm] (stop) {stop};
\end{tikzpicture}

\end{document}


I literally copied-and-pasted this code from an example document, just to use as a test. And here's the error it produces:

Package pgfkeys Error: I do not know the key '/tikz/ellipse' and I am going to ignore it. Perhaps you misspelled it.

Well, I didn't misspell it. I get a similar error message for the diamond as well. How can I fix this?

Thanks a ton!

-

## closed as too localized by Stefan Kottwitz♦Jan 31 '13 at 19:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You should have worked more carefully. You have forgotten to include the tikZ libraries.
\usetikzlibrary{shapes,arrows}

Although, to be fair, the example does present it's self as being "complete" with \documentaclass, \includepackage, etc. Looks like it needs some updating to reflect the modularization of TikZ. –  Sharpie Oct 13 '10 at 16:36
@Sharpie: The original example does have the right \usetikzlibrary command. So this was a cut-and-paste error. –  Loop Space Oct 13 '10 at 16:44