AM Generation using Matplotlib Python