updated to work with matlplotlib 1.4.0