Revert "remove matplotlib"

This reverts commit 78de828b78e21c542ac66e568aee5ec1fa7e0845.