Error with matplotlib.show() : module ‘matplotlib’ has no attribute ‘show’ [duplicate]

Do not use

import matplotlib as plt

but rather use

import matplotlib.pyplot as plt

plt is an abbreviation for pyplot, which is a module inside the matplotlib package. You need to address it for the kinds of things you are doing, not just matplotlib.

Note that matplotlib can be used without using pyplot at all, but most people find it easier to use pyplot. See its documentation or the tutorial for details.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)