You need to load the appropriate libraries:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols,patterns}
\begin{document}
\begin{tikzpicture}
\node[
draw,
cloud,
cloud puffs = 10,
pattern=north east lines,
minimum width=1cm,
minimum height=0.75cm
]{};
\end{tikzpicture}
\end{document}
You can use the style more than once:
\node [draw, double circle={2pt}{black!75},
double circle={4pt}{black!50},
double circle={6pt}{black!25}] (c1) {};
Or could nest them:
\node [draw,
double circle={2pt}{black!75,
double circle={2pt}{black!50,
double circle={2pt}{black!25}}}] (c1) {};
Code
\documentclass[tikz] {standalone}
\usetikzlibrary{calc}
\tikzset{
old inner xsep/.estore in=\oldinnerxsep,
old inner ysep/.estore in=\oldinnerysep,
double circle/.style 2 args={
circle,
old inner xsep=\pgfkeysvalueof{/pgf/inner xsep},
old inner ysep=\pgfkeysvalueof{/pgf/inner ysep},
/pgf/inner xsep=\oldinnerxsep+#1,
/pgf/inner ysep=\oldinnerysep+#1,
alias=sourcenode,
append after command={
let \p1 = (sourcenode.center),
\p2 = (sourcenode.east),
\n1 = {\x2-\x1-#1-0.5*\pgflinewidth}
in
node [inner sep=0pt, draw, circle, minimum width=2*\n1,at=(\p1),#2] {}
}
},
double circle/.default={2pt}{blue}
}
\begin{document}
\begin{tikzpicture}
\node [draw, double circle={2pt}{black!75},
double circle={4pt}{black!50},
double circle={6pt}{black!25}] (c1) {};
\node [draw, double circle={-2pt}{black!75},
double circle={-4pt}{black!50},
double circle={-6pt}{black!25}] (c2) at (2,0) {};
\end{tikzpicture}
\begin{tikzpicture}
\node [draw,
double circle={2pt}{black!75,
double circle={2pt}{black!50,
double circle={2pt}{black!25}}}] (c1) {};
\node [draw,
double circle={-2pt}{black!75,
double circle={-2pt}{black!50,
double circle={-2pt}{black!25}}}] (c2) at (2,0) {};
\end{tikzpicture}
Output
Best Answer
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 is2pt
), and the second for specifying the colour (or any combination of options, really) of the inner circle (default isblue
).If you specify a node name, this will refer to the outer node (thanks to Andrew Stacey for the suggestion).
will give you