I'had this problem, But when I'm review my code again I found that at first of code I Import matplotlib not matplotlib.pyplot maybe same reason