delete deprecated matplotlib code