handle problems importing matplotlib in util/graph.py