簡體   English   中英

pgf tikz for LaTeX如何在節點上使用x和y坐標

[英]pgf tikz for LaTeX how can I use x and y coordinates with node

我有以下矩形:

\begin{tikzpicture}
\draw[thin] (0,0) -- (7,0) -- (7,5) -- (7,5) -- (0,5) -- (0,0);
\end{tikzpicture}

我想使用節點為矩形的寬度和高度添加文本標簽。 但是不知道如何為文本標簽指定x,y坐標。

我可以在節點上使用x,y坐標嗎?

您可以使用at (x, y)語法來做到這一點:

\begin{tikzpicture}
  \draw[thin] (0,0) -- (7,0) -- (7,5) -- (7,5) -- (0,5) -- (0,0);
  \node at (3.5, -0.5) {7cm};
  \node at (-0.5, 2.5) {5cm};
\end{tikzpicture}

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM