test02.pikchr 714 B

12345678910111213141516171819202122232425262728293031323334
  1. /* First generate the main graph */
  2. scale = 0.75
  3. Main: [
  4. circle "C0"
  5. arrow
  6. circle "C1"
  7. arrow
  8. circle "C2"
  9. arrow
  10. circle "C4"
  11. arrow
  12. circle "C6"
  13. ]
  14. Branch: [
  15. circle "C3"
  16. arrow
  17. circle "C5"
  18. ] with .sw at Main.C2.n + (0.35,0.35)
  19. arrow from Main.C2 to Branch.C3 chop
  20. /* Now generate the background colors */
  21. layer = 0
  22. $featurecolor = 0xfedbce
  23. $maincolor = 0xd9fece
  24. $divY = (Branch.y + Main.y)/2
  25. $divH = (Branch.y - Main.y)
  26. box fill $featurecolor color $featurecolor \
  27. width Branch.width*1.5 height $divH \
  28. at Branch
  29. box fill $maincolor color $maincolor \
  30. width Main.width+0.1 height $divH \
  31. at Main
  32. "main" ljust at 0.1 se of nw of 2nd box
  33. "feature" ljust at 0.1 se of nw of 1st box