Saturday, June 29, 2019

using matplot lib


""" ***********************************************
programming Language :Python
Tool(IDE) used :Anaconda -> Spider
 date:06-06-2019
 created by:ANIL DURGAM

*****************************************************"""
from numpy import linspace, sin, exp, pi
import matplotlib.pyplot as mp
# calculate 500 values for x and y without a for loop
x = linspace(0, 10*pi, 500)
y = sin(x) * exp(-x/10)
# make diagram
mp.plot(x,y)
mp.show()


output:


No comments:

Post a Comment

python class topic video