implemented, but not working matplotlib