Let's say I create a node at a specific coordinate and I want its content to be displayed at 2 cm from it's coordinate. What is the simplest way to do this?
Asked
Active
Viewed 76 times
0
-
1Welcome to the site. Please edit your question and provide a minimum working example. – Steven B. Segletes Jun 22 '21 at 23:24
-
\node[left] at (1.3206,7.8665) {+}; I want that + to be located at 2cm apart from the coordinate (1.3206,7.8665). – el_maxx Jun 22 '21 at 23:36
-
@el_maxx please see the edit to the answer also – js bibra Jun 24 '21 at 03:50
-
would you like to accept and upvote the answer – js bibra Jun 25 '21 at 01:03
1 Answers
1
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikz[label distance=2mm]%<---------------------
\node[
circle,
fill=gray!45,
label=above:12,
label=right:3,
label=below:6,
label=left:9
]
{clock};
\end{tikzpicture}
\begin{tikzpicture}
\tikz[label distance=2mm]%<---------------------
\node[
circle,
fill=gray!45,
label={[label distance=2cm]above:12},
label=right:3,
label=below:6,
label=left:9
]
{clock};
\end{tikzpicture}
\end{document}
EDIT
Syntax
label={[label distance=2cm]angle:label text}]
MWE
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[left] at (1.3206,7.8665) {original+};
\node[left, label={[label distance=2cm]0:displaced+}] at (1.3206,7.8665) {};
\end{tikzpicture}
\end{document}
js bibra
- 21,280

