workaround nxutils deprecation in matplotlib