import matplotlib.pyplot as pltimport numpy as np
x = np.linspace(-10, 10, 100)y1 = x + 7y2 = -x + 3
plt.figure()plt.plot(x, y1, label='y = x + 7')plt.plot(x, y2, label='y = -x + 3')plt.xlabel('x')plt.ylabel('y')plt.legend()plt.grid(True)plt.title('Graphs of y = x + 7 and y = -x + 3')plt.axhline(0, color='black',linewidth=0.5)plt.axvline(0, color='black',linewidth=0.5)plt.show()
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-10, 10, 100)
y1 = x + 7
y2 = -x + 3
plt.figure()
plt.plot(x, y1, label='y = x + 7')
plt.plot(x, y2, label='y = -x + 3')
plt.xlabel('x')
plt.ylabel('y')
plt.legend()
plt.grid(True)
plt.title('Graphs of y = x + 7 and y = -x + 3')
plt.axhline(0, color='black',linewidth=0.5)
plt.axvline(0, color='black',linewidth=0.5)
plt.show()