Answers for "how to draw a function graph in python"

1

plot function in numpy

import numpy as np 
from matplotlib import pyplot as plt 

x = np.arange(1,11) 
y = 2 * x + 5 
plt.title("Matplotlib demo") 
plt.xlabel("x axis caption") 
plt.ylabel("y axis caption") 
plt.plot(x,y) 
plt.show()
Posted by: Guest on June-12-2020

Code answers related to "how to draw a function graph in python"

Python Answers by Framework

Browse Popular Code Answers by Language