Dealing with matplotlib can be kind of tricky. The docs should discuss how to do both blocking and non-blocking plots.