GraphViz is a nice, extensible tool to draw graphs, trees, diagrams, among others. It's scripted using a simple language called DOT, which reads a lot like text in plain English.
I've published a handful of examples, and an unfinished guide here on this website. You may also find the official user documentation useful.
1digraph collatz { 2» node [ 3» » fontname = "Lato, sans-serif"; 4» » width = 0; height = 0; 5» » shape = box; 6» » color = "#cccccc"; 7» ]; 8» edge [ 9» » fontname = "Lato, sans-serif"; 10» » arrowhead = normal; 11» » arrowsize = 0.5; 12» ]; 13» 14» "start", "stop" [shape = oval]; 15» "is x even?", "does x equal to 1?" [ 16» » shape = diamond; 17» » height = 1 18» ]; 19 20» "start" -> "is x even?" 21» "is x even?" -> "divide x by 2" [label = "yes"]; 22» "is x even?" -> "multiply x by 3 and add 1" [label = "no"]; 23» "divide x by 2" -> "does x equal to 1?"; 24» "multiply x by 3 and add 1" -> "does x equal to 1?"; 25» "does x equal to 1?" -> "stop" [label = "yes"]; 26» "does x equal to 1?" -> "is x even?" [label = "no"]; 27}