Dealing with matplotlib can be kind of tricky. The docs should discuss how to do both blocking and non-blocking plots. Copied from https://github.com/qiemem/PythonExtension/issues/1