[Tex/LaTex] Size of TikZ ellipse node

nodesspacingtikz-pgf

When I set the minimum size of an ellipse in a tikzpicture environment, it expands into a circle if the inner content does not grow as large as the ellipse shape itself.

Is there any way around it?

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\tikzstyle{every node}=[draw, ellipse, minimum size=100pt,
    align=center]
\node (a) {Alpha};
\node[left=150pt, below=30pt] (b) at (a) {Beta};
\end{tikzpicture}
\end{document}

It seems to me that, without something as wide as the ellipse length, TikZ is not able to define the width and height of the ellipse, but how can I set these variables?

Best Answer

You can set minimum height=<length>, or minimum width=<length> as shown in MWE:

enter image description here

Notes:

  • As Qrrbrbirlbel commented, setting minimum size is setting both the values of minimum width and minimum height and hence you end up with a circle.
  • If you want to specify both the minimum height= and minimum width= parameters you need to set them to different values, otherwise you will again end up with a circle.

Code:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\tikzstyle{every node}=[ultra thick, draw=blue, ellipse, minimum width=100pt,
    align=center]
\node (a) {Alpha};
\node[left=150pt, below=30pt] (b) at (a) {Beta};
\end{tikzpicture}
\end{document}