added a missing docstring and removed an unused matplotlib module