figure is used to open a figure window, and can be used to generate axes. fig = figure(n) produces a figure object with id n, and assigns the object to fig.
add_subplot is used to add axes to a figure. ax = fig.add_subplot(111) can be used to add a basic axes to a figure. ax = fig.add_subplot(m,n,i) can be used to add an axes to a non-trivial figure with a m by n grid of plots.
close closes figures. close(n) closes the figure with id n, and close(’all’) closes all figure windows.
show is used to force an update to a figure, and pauses execution if not used in an interactive console (close the figure window to resume execution). show should not be used in standalone Python programs – draw should be used instead.
draw forces an update to a figure.
Save to file: savefig(’filename.ext’) ext can be png, gif, jpg, svg etc.