import numpy as npimport matplotlib.pyplot as plt
x = np.linspace(-10, 10, 400)y1 = x - 2y2 = 0.6*x - 1y3 = x + 4
plt.figure(figsize=(10, 6))plt.plot(x, y1, label='y=x-2')plt.plot(x, y2, label='y=0.6x-1')plt.plot(x, y3, label='y=x+4')plt.axhline(0, color='black',linewidth=0.5)plt.axvline(0, color='black',linewidth=0.5)plt.xlabel('x')plt.ylabel('y')plt.legend()plt.grid(color = 'gray', linestyle = '--', linewidth = 0.5)plt.title('Graph of y=x-2, y=0.6x-1, y=x+4')plt.show()
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-10, 10, 400)
y1 = x - 2
y2 = 0.6*x - 1
y3 = x + 4
plt.figure(figsize=(10, 6))
plt.plot(x, y1, label='y=x-2')
plt.plot(x, y2, label='y=0.6x-1')
plt.plot(x, y3, label='y=x+4')
plt.axhline(0, color='black',linewidth=0.5)
plt.axvline(0, color='black',linewidth=0.5)
plt.xlabel('x')
plt.ylabel('y')
plt.legend()
plt.grid(color = 'gray', linestyle = '--', linewidth = 0.5)
plt.title('Graph of y=x-2, y=0.6x-1, y=x+4')
plt.show()