[Tex/LaTex] How set TikZ circle radius in \node[circle]

tikz-nodetikz-pgf

I know that with TikZ, we can specify the radius of a circle when a \draw command is used, as in:

 \draw[fill] (1,2) circle (3pt);

But how does one indicate the radius when you draw the circle by means of a \node command, as in the following?

 \node[fill,circle,label=below left:$x$] at (1,2) {};

For example, suppose I want a 3pt radius of the circle in this:

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
   \node[fill,circle,label=below left:$x$] at (1,2) {};
\end{tikzpicture}
\end{document}

I prefer to see two ways of doing this: one way that would apply just to the particular (filled) circle, and a second way that could be used globally for the entire picture.

Best Answer

at node with circle shape is radius equal to minimum size/2, of course if you set inner sep to zero. node features can define local at node or as new style with tikzpicture options or globally with tikzset in preamble of a document. for example:

\documentclass[tikz, margin=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[
dot/.style = {circle, fill, minimum size=#1,
              inner sep=0pt, outer sep=0pt},
dot/.default = 6pt  % size of the circle diameter 
                    ]  
\node[dot,label=below left:radius 3pt] at (0,0) {};
\node[dot=5pt,label=below left:radius 5pt] at (3,0) {};
\draw[red, semitransparent] (0,0) circle[radius=3pt];% test of the radius size
\end{tikzpicture}
\end{document}

or

\documentclass[tikz, margin=3mm]{standalone}
\tikzset{
dot/.style = {circle, fill, minimum size=#1,
              inner sep=0pt, outer sep=0pt},
dot/.default = 6pt % size of the circle diameter 
}
\begin{document}
\begin{tikzpicture}                   ]  
\node[dot,label=below left:radius 3pt] at (0,0) {};
\node[dot=10pt,label=below left:radius 5pt] at (3,0) {};
\draw[red, semitransparent] (0,0) circle[radius=3pt];% test of the radius size
\end{tikzpicture}
\end{document}

enter image description here