diagnostics on matplotlib