Removing an axis or both axes from a matplotlib plot

Sometimes, the frame around a matplotlib plot can detract from the information you are trying to convey.  How do you remove the frame, ticks, or axes from a matplotlib plot? Some books you may find useful when working with matplotlib: The full example is available on github.