File: polyplot.py

package info (click to toggle)
pycode-browser 1%3A1.02%2Bgit20181006-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,088 kB
  • sloc: python: 2,779; xml: 152; makefile: 71
file content (12 lines) | stat: -rwxr-xr-x 193 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
#Example polyplot.py

from pylab import *
x = linspace(-pi, pi, 100)
a = poly1d([-1.0/5040,0,1.0/120,0,-1.0/6,0,1,0])
da = a.deriv() 
y = a(x)
y1 = da(x)
plot(x,y)
plot(x,y1)
grid(True)
show()