Matplotlib Code Example Of A Recursive Method