Updated graphing function and added example graph of first snippet.