Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Created on Mon Dec 9 21:19:49 2019
- @author: Hugo
- """
- import matplotlib.pyplot as plt
- import numpy as np
- a = int(input('Please describe an integer a: '))
- b = int(input('Please describe an integer b: '))
- x = np.linspace(-1, 10, 100)
- y = a*x+b
- plt.plot(x, y, color = 'blue', label = 'Linear function a*x+b')
- plt.title('Linear function a*x+b')
- plt.xlabel('x', color = 'magenta')
- plt.ylabel('y', color = 'black')
- plt.legend(loc = 'lower right')
- plt.grid()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement