5

I drew a point using TikZ and labelled it 'P0'.

\documentclass[a4paper,10pt]{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[scale=1]

  \path (0,0) coordinate (P0) node[right]{P0};
  \fill (P0) circle (2pt);

\end{tikzpicture}

\end{document}

Now, in the output, the label 'P0' is too close to the point itself. Is there a way to move it further from the point?

1
  • P0 is not a label, it's node containing only text. Tikz has a separate label attribute. Not to be picky, but could you remove the term "label" from this question? I'm trying to set the distance from a node to its label and it's unfortunately a completely different question.
    – Jason S
    Jul 30 '14 at 22:33
6

You can use right=<dimension>

\documentclass[a4paper,10pt]{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[scale=1]

  \path (0,0) coordinate (P0) node[right=2cm]{P0};
  \fill (P0) circle (2pt);

\end{tikzpicture}

\end{document}

enter image description here

1
  • Do you know the default distance value ?
    – Matheod
    Aug 26 '19 at 2:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.