How to draw an ellipse?
\documentclass[border=3pt]{standalone}
\usepackage{tikz}
\begin{document}
\tikz \draw (0,0) ellipse (2cm and 1cm);
or
\begin{tikzpicture}
\draw (0,0) ellipse (2cm and 1cm);
\end{tikzpicture}
\end{document}
EDIT:
\documentclass[border=3pt]{standalone}
\usepackage{tikz}
\def\myellipse{(0,0) ellipse (2cm and 1cm)}
\begin{document}
\tikz \draw \myellipse ;
or
\begin{tikzpicture}
\draw \myellipse;
\end{tikzpicture}
\end{document}
The pgfmanual gives \draw (a,b) circle [x radius=1cm, y radius=2cm];
With a macro
\newcommand{\boundellipse}[3]% center, x rad, y rad
{(#1) ellipse [x radius=#2,y radius=#3]
}
The notion is xdim and ydim
, you are using xdim, ydim
:
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\newcommand{\boundellipse}[3]% center, xdim, ydim
{(#1) ellipse (#2 and #3)
}
\begin{tikzpicture}
\draw \boundellipse{0,0}{10}{5};
\draw \boundellipse{4,1}{-2}{4};
\draw \boundellipse{-2,4}{1}{3};
\end{tikzpicture}
\end{document}