The following code gives me a plot with significant margins above and below the figure. I don\'t know how to eliminate the noticeable margins. subplots_adjust does
subplots_adjust
tight_layout(pad=0) will meet your need. http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.tight_layout
tight_layout(pad=0)