11# Recursion Visualiser
2+
3+ ![ ] ( https://forthebadge.com/images/badges/made-with-python.svg )
4+
25Recursion visualiser is a python tool that visualizes recursion tree with animation and draws recursion tree for recursive function.
36It works with almost any type of recursive function.
47Just add the recursion-visualiser decorator to your function and let it do the rest of the work.
@@ -45,8 +48,8 @@ Now we want to draw the recursion tree for this function. It is as simple as add
4548from visualiser.visualiser import Visualiser as vs
4649
4750# Add decorator
48- # Decorator accepts arguments: ignore_args and show_argument_name
49- @vs ()
51+ # Decorator accepts optional arguments: ignore_args , show_argument_name, show_return_value and node_properties_kwargs
52+ @vs (node_properties_kwargs = { " shape " : " record " , " color " : " #f57542 " , " style " : " filled " , " fillcolor " : " grey " } )
5053def fib (n ):
5154 if n <= 1 :
5255 return n
@@ -73,9 +76,9 @@ Here are the changes required:
7376
7477Here is how the recursion tree looks like:
7578Animation:
76- ![ enter image description here] ( https://github. com/sarangbishal/Recursion-Visualizer/blob /master/examples/fibonacci.gif )
79+ ![ enter image description here] ( https://raw.githubusercontent. com/sarangbishal/Recursion-Tree- Visualizer/master/examples/fibonacci.gif )
7780
78- ![ enter image description here] ( https://github. com/sarangbishal/Recursion-Visualizer/blob /master/examples/fibonacci.png )
81+ ![ enter image description here] ( https://raw.githubusercontent. com/sarangbishal/Recursion-Tree- Visualizer/master/examples/fibonacci.png )
7982
8083Find other examples : [ here] ( https://github.com/sarangbishal/Recursion-Tree-Visualizer/tree/master/examples )
8184and read more about ** recursion-visualiser** [ here] ( https://github.com/sarangbishal/Recursion-Tree-Visualizer/blob/master/Examples.md )
@@ -87,7 +90,7 @@ and read more about **recursion-visualiser** [here](https://github.com/sarangbis
8790 - [x] Add node styles
8891 - [ ] Support aliasing for function name
8992 - [ ] Show repeated states
90- - [ ] Support node_color, backgroundcolor etc
93+ - [x ] Support node_color, backgroundcolor etc
9194 - [ ] Refactor
9295 - [ ] Handle base cases
9396 - [ ] Make more beautiful trees
0 commit comments