Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[tikz]{standalone}
- tikzset{
- pics/tripdots/.style args={#1-#2-#3,name=#4}{
- code={
- begin{scope}[local bounding box=#4]
- draw (-1.2,0)--(1.2,0);
- draw (0,0.2)--(0,-.2);
- filldraw[fill=#1] (-1,0) circle (4pt);
- filldraw[fill=#2] (0,0) circle (4pt);
- filldraw[fill=#3] (1,0) circle (4pt);
- end{scope}
- }
- }
- }
- begin{document}
- begin{tikzpicture}
- pic at (0,0) {tripdots={red-yellow-green,name=a}};
- draw[<-] (a) -- ++(.5,1) node[above] {scalebox{0.5}{Traffic lights}};
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement