2

I need to change the size of the circle but using radius doesn't work here.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\path node(ID1)[draw,shape=rectangle]{ID1};
\path node[draw=red,shape=circle]at(ID1.north){};
\end{tikzpicture}
\end{document}
  • It's neither nor. If you want a circle of radius exactly 2pt, try \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path node(ID1)[draw,shape=rectangle]{ID1}; \path node[draw=red,shape=circle,minimum size=4pt,inner sep=0pt,outer sep=0pt]at(ID1.north){}; \draw[blue] (ID1.north east) circle[radius=2pt]; \end{tikzpicture} \end{document} – user121799 Feb 15 at 23:24
2

There are several pgf keys that matter, which you can control by setting minimum size and inner sep appropriately. inner sep is, to a good approximationif the radius is not "too small". If you want to control the radius very precisely, useinner sep=0ptandminimum size=`.

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
 \path node(ID1)[draw,shape=rectangle]{ID1};
 \path node[draw=red,shape=circle,minimum size=4pt,inner sep=0pt,outer sep=0pt]at(ID1.north){};
 \draw[blue] (ID1.north east) circle[radius=2pt];
\end{tikzpicture}
\end{document}

enter image description here

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.