if import matplotlib failed, disable plotting