update matplotlib init method