load matplotlib properly