better matplotlib integration