How to plot a Sin Graph in Python

 How to plot a Sin Graph in Python


In this blog we will learn how to plot a sin graph in python

import matplotlib.pyplot as plt # include module for graph plotting
import numpy as np 
t = np.linspace(0,2*np.pi,360)  #ordinate axis  goes from 0 to 360 with a interval of 2*pi
x= 10*np.sin((t))
plt.plot(t,x)   # graph plotting
plt.show()    #add this line if you are not using jupyter



Post a Comment

0 Comments