I am using python 3.6 and a learner. Below is a simple code of a sin wave.
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-10 , 10, 100)
y = np.sin(x)
plt.plot(x, y, marker="x")
I am receiving the error “AttributeError: module ‘matplotlib’ has no attribute ‘plot'” Any help would be appreciated.
Kenil Vasani
Have you installed matplotlib properly? I added an extra line to your code to show the plot. This code works properly in Visual Studio after installing the matplotlib library.