Avoid importing matplotlib in top-level namespace