Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

To label a node with "1" in TikZ, I can use

\path (0,1) coordinate (P1) node[right=0.05cm] {1};

Is there a way to circle the label "1"?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Add the circle and draw options to the node:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture} 
\path (0,1) coordinate (P1) node[right=0.05cm,circle,draw] {1};
\end{tikzpicture}

\end{document}

You can adjust the distance between the border and the 1 using, for example inner sep=<length>, or minimum size=<length>.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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