fix for newer matplotlib