Among the many matplotlib backends, what I found is that
WebAgg works well on a mac.
Backends could either be set in your bashrc/zshrc files using
or a file located at
A very useful customized backend is
itermplot which displays plot result right in your iterm.