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.
Rohit Patel
Do not use
but rather use
plt
is an abbreviation forpyplot
, which is a module inside thematplotlib
package. You need to address it for the kinds of things you are doing, not justmatplotlib
.Note that
matplotlib
can be used without usingpyplot
at all, but most people find it easier to usepyplot
. See its documentation or the tutorial for details.