Run »
×
Change Orientation
# Import Libraries import sys, matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np # Name Axis plt.title('y = 1.2 * x + 2') plt.xlabel('x - axis') plt.ylabel('y - axis') # Set Axis Range plt.xlim(0, 10) plt.ylim(0, 10) # Set x and y values x = np.array([0,1,2,3,4,5,6,7,8,9,10]) slope = 1.2 intercept = 2 # Plot the Graph plt.plot(x, slope * x + intercept) plt.show() # Save and Flush the Plot plt.savefig(sys.stdout.buffer) sys.stdout.flush()
×
Report a Problem:
Your E-mail:
Page address:
Description:
Submit