Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. documentclass[tikz,border=3.14mm]{standalone}
  2. usetikzlibrary{arrows.meta,shapes.geometric}
  3. newcounter{pft}
  4. begin{document}
  5. begin{tikzpicture}[font=sffamily,pics/cgram/.style={code={
  6. foreach XX [count=YY starting from 0] in {1,...,#1}
  7. {pgfmathsetmacro{mycolor}{{LstCols}[YY]}
  8. node[circle,draw,minimum size=2.5em,fill=mycolor] (c-#1-XX) at
  9. ({{LstAngles}[#1-2]-YY*360/#1}:1.5) {setcounter{pft}{XX}Alph{pft}};}
  10. foreach XX [evaluate=XX as Ymax using {int(XX-1)}] in {2,...,#1}
  11. {foreach YY in {1,...,Ymax}
  12. {pgfmathsetmacro{mycolorA}{{LstCols}[XX-1]}
  13. pgfmathsetmacro{mycolorB}{{LstCols}[YY-1]}
  14. draw[{Stealth[fill=mycolorB,length=7pt]}-{Stealth[fill=mycolorA,length=7pt]}] (c-#1-XX) -- (c-#1-YY);}}
  15. }}]
  16. defLstCols{"red","orange","yellow","green!70!black","blue!70!white","purple!80!white"}
  17. defLstAngles{180,150,135,128,120}
  18. path (-5,0) pic {cgram=2} (0,0.5) pic {cgram=3} (5,0) pic {cgram=4}
  19. (-3,-4) pic {cgram=5} (3,-4) pic {cgram=6};
  20. end{tikzpicture}
  21. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement