Chart the following equation y=3x+2 using Python.
Not applicable
import matplotlib.pyplot as plt

x_values = range(-20, 21)
y_values = [3*x+2 for x in x_values]

plt.plot(x_values, y_values)
plt.xlabel('x')
plt.ylabel('y')
plt.title('y = 3x + 2')
plt.show()