1import matplotlib.pyplot as plt
2import numpy as np
3x = np.linspace(-5,5,100)
4y = 2*x+1
5plt.plot(x, y, '-r', label='y=2x+1')
6plt.title('Graph of y=2x+1')
7plt.xlabel('x', color='#1C2833')
8plt.ylabel('y', color='#1C2833')
9plt.legend(loc='upper left')
10plt.grid()
11plt.show()