11

I want to draw a circle of 4mm with minus sign inside it. I have set the m style:

\tikzstyle{m}=[circle, thin, draw=red, fill=red, minimum size=4mm]

however the minus sign extends the circle. I want the sign to almost fill the circle. I tried to change the line to be:

\tikzstyle{m}=[circle, thin, draw=red, fill=red, size=4mm]

but it didn't work.

How can I set the circle size to be fixed?

  • 2
    I usually just keep the circle empty, and add another node, at the same coordinate, that holds the text. – Ran G. Jun 20 '11 at 1:41
15

TikZ automatically adds separation between the text and the node border. When setting a minimum size for a node, it's usually a good idea to set inner sep=0pt:

\tikzstyle{m}=[circle, thin, draw=red, fill=red, minimum size=4mm,inner sep=0pt]

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.