TikZ:如何增加节点中的文本?

TikZ:如何增加节点中的文本?

我想画一些带有文字的圆圈。我可以增加半径,但文字自然保持不变。我知道\Huge,我尝试过使用它,但它似乎在数学模式下不起作用。如何控制/增加下面T_1的文本大小?T_4

麦格维:

\documentclass[tikz,border=1cm]{standalone}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}[>=latex,line cap=round,line 
join=round,scale=2]

  \coordinate (A) at (0,0,0);
  \draw ($(A)+(0,2,4)$) circle [radius=2] node {$T_1$};
  \draw ($(A)+(0,-0.5,4)$) circle [radius=2] node {$T_2$};
  \draw ($(A)+(0,-2,4)$) circle [radius=2] node {$T_3$};
  \draw ($(A)+(0,0,2)$) circle [radius=2] node {${\Huge T_4}$};

\end{tikzpicture}
\end{document}

答案1

您可以使用节点选项font

\documentclass[tikz,border=1cm]{standalone}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}[>=latex,line cap=round,line 
join=round,scale=2]

  \coordinate (A) at (0,0,0);
  \draw ($(A)+(0,2,4)$) circle [radius=2] node[font=\Huge] {$T_1$};
  \draw ($(A)+(0,-0.5,4)$) circle [radius=2] node[font=\Huge] {$T_2$};
  \draw ($(A)+(0,-2,4)$) circle [radius=2] node[font=\Huge] {$T_3$};
  \draw ($(A)+(0,0,2)$) circle [radius=2] node[font=\Huge] {$T_4$};

\end{tikzpicture}
\end{document}

在此处输入图片描述

如果您的节点全部应该带有font=\Huge,您可以将此选项作为您的tikzpicture环境的参数。

\documentclass[tikz,border=1cm]{standalone}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}[>=latex,line cap=round,line 
join=round,scale=2, font=\Huge]

  \coordinate (A) at (0,0,0);
  \draw ($(A)+(0,2,4)$) circle [radius=2] node {$T_1$};
  \draw ($(A)+(0,-0.5,4)$) circle [radius=2] node {$T_2$};
  \draw ($(A)+(0,-2,4)$) circle [radius=2] node {$T_3$};
  \draw ($(A)+(0,0,2)$) circle [radius=2] node {$T_4$};

\end{tikzpicture}
\end{document}

相关内容