\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning}
\begin{document}
\begin{tikzpicture}
\node (A) [cylinder, shape border rotate=90, draw,minimum
height=3cm,minimum width=2cm] {};
\node (B) [cylinder, shape border rotate=90, draw,minimum
height=3cm,minimum width=2cm, below=0.3cm of A]
{Wider?};
\node (C) [cylinder, shape border rotate=90, draw,minimum
height=3cm,minimum width=2cm, below=0.3cm of B]
{Why is the Ellipse wider?};
\end{tikzpicture}
\end{document}
生成:
随着节点内的文本变宽,圆柱节点顶部的椭圆变得不再那么扁。如何控制这一点?
尽管可以拉伸以适合文本,我仍想保持椭圆的大致相同的外观。