I found that I cannot creating ellipse with Tikz 3.0.1a for the following example
\begin{tikzpicture}
\node(a) [ellipse,draw] {};
\end{tikzpicture}
with error message:
Package pgfkeys Error: I do not know the key '/tikz/ellipse' and I am going
to ignore it. Perhaps you misspelled it. \node(a) [ellipse,draw]
while the following code works well
\begin{tikzpicture}
\draw (0,0) ellipse [x radius=20pt, y radius=10pt];
\end{tikzpicture}
Do I miss something here?
Best Answer
If you want an ellipse-shaped
node
, you need to loadtikz
shapes.geometric
library. Onlycircle
,rectangle
andcoordinate
are defined initially. See section 67 p 693 of the manual.Please note that though Hirak's answer provides ways to obtain ellipses, some comments can be formulated
\draw ... ellipse
is an ellipse-shapedpath
not anode
tikzpictures
can lead to great modifications in a graphic and should be done carefullyshapes
library is provided in the latest versions ofpgf-tikz
for compatibility reasons, it has been superseded by theshapes.geometric
andshapes.misc
libraries.