switched to oo matplotlib to avoid memory leaks