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') plt.xlabel('x - axis') plt.ylabel('y - axis') # Set Axis Range plt.xlim(0, 10) plt.ylim(0, 10) # Put x values into an array x = np.array([0,1,2,3,4,5,6,7,8,9,10]) slope = 1.2 # Plot the Graph plt.plot(x, slope * x) 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