Revised matplotlib library for improved reliability