Remove extraneous dependencies on matplotlib