Initial commit, works but slowly using matplotlib interactive mode.