matplotlib is a optional dependency