3 Answers
3

Here's a new style double circle that can be supplied to a node. It takes two arguments, one for specifying how much larger the radius of the outer circle is (default is 2pt), and the second for specifying the colour (or any combination of options, really) of the inner circle (default is blue).

If you specify a node name, this will refer to the outer node (thanks to Andrew Stacey for the suggestion).

I would make the outer circle the one drawn by the node (at least by default) and increase the inner sep to ensure that there is room for the inner circle. My reason for this is that with a double circle I would expect the node boundary to be on the outer circle, not the inner one.
–
Loop SpaceDec 2 '11 at 7:45

@AndrewStacey: The first argument can be negative though. So depending on the input which circle is the outer one may vary. I do agree that by default a positive value should give the expected behaviour, which I would also expect to be the outer circle as the node boundary.
–
Roelof SpijkerDec 2 '11 at 8:10

@wh1t3 Yes, I see that. My comment is all about polishing and nothing about substance. It's a nice solution (particularly as it doesn't involve defining a new node shape) and this is purely about what a user might expect the default action to be.
–
Loop SpaceDec 2 '11 at 8:23

@AndrewStacey: Good point! Unfortunately, the value of inner sep can't simply be accessed using \pgfkeysvalueof{/tikz/inner sep}, so making this solution behave as you suggest isn't trivial. Feel free to edit this answer or add a new one if you come up with a way to make the outer circle the node border.
–
JakeDec 2 '11 at 12:30

Looking at the code, it should be the value of /pgf/inner xsep (and /pgf/inner ysep). I haven't tested it, though.
–
Loop SpaceDec 2 '11 at 13:07

thanks! is there a way to have a single \node[whatever] {content}?
–
brillout.comDec 1 '11 at 23:27

See updated solution. Is Version 2 or 5 what you want?
–
Peter GrillDec 1 '11 at 23:36

i would like the stroke to have a different color and both circle having slightly different size, so version 3 would be the closest one. thanks for all the nice tikz snippets
–
brillout.comDec 1 '11 at 23:47

Note that this is a Question and Answer (or Q&A) site and not a forum that hosts discussions on a specific topic. Even though this is a neat application of an answer for the given question, it is technically not an "answer".
–
WernerFeb 7 '12 at 18:48