diff should not specifically rely on matplotlib