1 matplotlib matplotlib Python matplotlib numpy matplotlib Installing A 2 pyplot matplotlib 1 matplotlib.pyplot matplotlib.pyplot plt import import nu

Similar documents
Visual Python, Numpy, Matplotlib

Python (Anaconda ) Anaconda 2 3 Python Python IDLE Python NumPy 6

Python ( ) Anaconda 2 3 Python Python IDLE Python NumPy 6 5 matpl

Visual Python, Numpy, Matplotlib

1 6/13 2 6/20 3 6/27 4 7/4 5 7/11 6 7/18 N 7 7/25 Warshall-Floyd, Bellman-Ford, Dijkstra TSP DP, 8/1 2 / 36

2015 I ( TA)

GraphicsWithPlotFull.nb Plot[{( 1), ( ),...}, {( ), ( ), ( )}] Plot Plot Cos x Sin x, x, 5 Π, 5 Π, AxesLabel x, y x 1 Plot AxesLabel

, 3, 6 = 3, 3,,,, 3,, 9, 3, 9, 3, 3, 4, 43, 4, 3, 9, 6, 6,, 0 p, p, p 3,..., p n N = p p p 3 p n + N p n N p p p, p 3,..., p n p, p,..., p n N, 3,,,,

No2 4 y =sinx (5) y = p sin(2x +3) (6) y = 1 tan(3x 2) (7) y =cos 2 (4x +5) (8) y = cos x 1+sinx 5 (1) y =sinx cos x 6 f(x) = sin(sin x) f 0 (π) (2) y

(2000 )

( ) kadai4, kadai4.zip.,. 3 cos x [ π, π] Python. ( 100 ), x cos x ( ). (, ). def print cos(): print cos()

, x R, f (x),, df dx : R R,, f : R R, f(x) ( ).,, f (a) d f dx (a), f (a) d3 f dx 3 (a),, f (n) (a) dn f dx n (a), f d f dx, f d3 f dx 3,, f (n) dn f

no35.dvi

di-problem.dvi

1 1 [1] ( 2,625 [2] ( 2, ( ) /

untitled

1 1 Gnuplot gnuplot Windows gnuplot gp443win32.zip gnuplot binary, contrib, demo, docs, license 5 BUGS, Chang

18 ( ) I II III A B C(100 ) 1, 2, 3, 5 I II A B (100 ) 1, 2, 3 I II A B (80 ) 6 8 I II III A B C(80 ) 1 n (1 + x) n (1) n C 1 + n C

Python Speed Learning


gnuplot gnuplot 1 3 y = x 3 + 3x 2 2 y = sin x sin(x) x*x*x+3*x*x

() x + y + y + x dy dx = 0 () dy + xy = x dx y + x y ( 5) ( s55906) 0.7. (). 5 (). ( 6) ( s6590) 0.8 m n. 0.9 n n A. ( 6) ( s6590) f A (λ) = det(a λi)

DVIOUT-MTT元原

pdf

1 1 sin cos P (primary) S (secondly) 2 P S A sin(ω2πt + α) A ω 1 ω α V T m T m 1 100Hz m 2 36km 500Hz. 36km 1

II Karel Švadlenka * [1] 1.1* 5 23 m d2 x dt 2 = cdx kx + mg dt. c, g, k, m 1.2* u = au + bv v = cu + dv v u a, b, c, d R

< 1 > (1) f 0 (a) =6a ; g 0 (a) =6a 2 (2) y = f(x) x = 1 f( 1) = 3 ( 1) 2 =3 ; f 0 ( 1) = 6 ( 1) = 6 ; ( 1; 3) 6 x =1 f(1) = 3 ; f 0 (1) = 6 ; (1; 3)

1 8, : 8.1 1, 2 z = ax + by + c ax by + z c = a b +1 x y z c = 0, (0, 0, c), n = ( a, b, 1). f = n i=1 a ii x 2 i + i<j 2a ij x i x j = ( x, A x), f =

or a 3-1a (0 b ) : max: a b a > b result a result b ( ) result Python : def max(a, b): if a > b: result = a else: result = b ret

1.3 2 gnuplot> set samples gnuplot> plot sin(x) sin gnuplot> plot [0:6.28] [-1.5:1.5] sin(x) gnuplot> plot [-6.28:6.28] [-1.5:1.5] sin(x),co

1W II K =25 A (1) office(a439) (2) A4 etc. 12:00-13:30 Cafe David 1 2 TA appointment Cafe D

[ ] x f(x) F = f(x) F(x) f(x) f(x) f(x)dx A p.2/29

mugensho.dvi

- II

function2.pdf

. p.1/15

A A p.1/16

2.2 h h l L h L = l cot h (1) (1) L l L l l = L tan h (2) (2) L l 2 l 3 h 2.3 a h a h (a, h)

2 1 x 1.1: v mg x (t) = v(t) mv (t) = mg 0 x(0) = x 0 v(0) = v 0 x(t) = x 0 + v 0 t 1 2 gt2 v(t) = v 0 gt t x = x 0 + v2 0 2g v2 2g 1.1 (x, v) θ

掲示用ヒート表 第34回 藤沢市長杯 2017

Microsoft Word - 触ってみよう、Maximaに2.doc

1.1 ft t 2 ft = t 2 ft+ t = t+ t d t 2 t + t 2 t 2 = lim t 0 t = lim t 0 = lim t 0 t 2 + 2t t + t 2 t 2 t + t 2 t 2t t + t 2 t 2t + t = lim t 0

40 6 y mx x, y 0, 0 x 0. x,y 0,0 y x + y x 0 mx x + mx m + m m 7 sin y x, x x sin y x x. x sin y x,y 0,0 x 0. 8 x r cos θ y r sin θ x, y 0, 0, r 0. x,

1 (1) ( i ) 60 (ii) 75 (iii) 315 (2) π ( i ) (ii) π (iii) 7 12 π ( (3) r, AOB = θ 0 < θ < π ) OAB A 2 OB P ( AB ) < ( AP ) (4) 0 < θ < π 2 sin θ

2009 IA 5 I 22, 23, 24, 25, 26, (1) Arcsin 1 ( 2 (4) Arccos 1 ) 2 3 (2) Arcsin( 1) (3) Arccos 2 (5) Arctan 1 (6) Arctan ( 3 ) 3 2. n (1) ta

t θ, τ, α, β S(, 0 P sin(θ P θ S x cos(θ SP = θ P (cos(θ, sin(θ sin(θ P t tan(θ θ 0 cos(θ tan(θ = sin(θ cos(θ ( 0t tan(θ

07_dist_01.pdf.pdf

i

高等学校学習指導要領

高等学校学習指導要領

Gmech08.dvi

GIZMO ¤ÇÍ·¤ó¤Ç¤ß¤ë

高等学校学習指導要領解説 数学編

Windows (L): D:\jyugyou\ D:\jyugyou\ D:\jyugyou\ (N): en2 OK 2

★結果★ 藤沢市長杯 掲示用ヒート表

x () g(x) = f(t) dt f(x), F (x) 3x () g(x) g (x) f(x), F (x) (3) h(x) = x 3x tf(t) dt.9 = {(x, y) ; x, y, x + y } f(x, y) = xy( x y). h (x) f(x), F (x

y π π O π x 9 s94.5 y dy dx. y = x + 3 y = x logx + 9 s9.6 z z x, z y. z = xy + y 3 z = sinx y 9 s x dx π x cos xdx 9 s93.8 a, fx = e x ax,. a =

5.. z = f(x, y) y y = b f x x g(x) f(x, b) g x ( ) A = lim h 0 g(a + h) g(a) h g(x) a A = g (a) = f x (a, b)

(3) (2),,. ( 20) ( s200103) 0.7 x C,, x 2 + y 2 + ax = 0 a.. D,. D, y C, C (x, y) (y 0) C m. (2) D y = y(x) (x ± y 0), (x, y) D, m, m = 1., D. (x 2 y

(1) (2) (3) (4) HB B ( ) (5) (6) (7) 40 (8) (9) (10)

SXF Converter for DWG 2004/ SXFデータトランスレータ 2004 注意事項

1 26 ( ) ( ) 1 4 I II III A B C (120 ) ( ) 1, 5 7 I II III A B C (120 ) 1 (1) 0 x π 0 y π 3 sin x sin y = 3, 3 cos x + cos y = 1 (2) a b c a +

I y = f(x) a I a x I x = a + x 1 f(x) f(a) x a = f(a + x) f(a) x (11.1) x a x 0 f(x) f(a) f(a + x) f(a) lim = lim x a x a x 0 x (11.2) f(x) x

曲面のパラメタ表示と接線ベクトル

4 4 θ X θ P θ 4. 0, 405 P 0 X 405 X P 4. () 60 () 45 () 40 (4) 765 (5) 40 B 60 0 P = 90, = ( ) = X



(, Goo Ishikawa, Go-o Ishikawa) ( ) 1

ContourPlot[{x^+y^==,(x-)^+y^==}, {x,-,}, {y,-,}, AspectRatio -> Automatic].. ContourPlot Plot AspectRatio->Automatic.. x a + y = ( ). b ContourPlot[x

N88 BASIC 0.3 C: My Documents 0.6: 0.3: (R) (G) : enterreturn : (F) BA- SIC.bas 0.8: (V) 0.9: 0.5:

18 ( ) ( ) [ ] [ ) II III A B (120 ) 1, 2, 3, 5, 6 II III A B (120 ) ( ) 1, 2, 3, 7, 8 II III A B (120 ) ( [ ]) 1, 2, 3, 5, 7 II III A B (


1 θ i (1) A B θ ( ) A = B = sin 3θ = sin θ (A B sin 2 θ) ( ) 1 2 π 3 < = θ < = 2 π 3 Ax Bx3 = 1 2 θ = π sin θ (2) a b c θ sin 5θ = sin θ f(sin 2 θ) 2

agora04.dvi

I A A441 : April 15, 2013 Version : 1.1 I Kawahira, Tomoki TA (Shigehiro, Yoshida )

y2=x2(x+1)-001.ps

2 T ax 2 + 2bxy + cy 2 + dx + ey + f = 0 a + b + c > 0 a, b, c A xy ( ) ( ) ( ) ( ) u = u 0 + a cos θ, v = v 0 + b sin θ 0 θ 2π u = u 0 ± a

1 No.1 5 C 1 I III F 1 F 2 F 1 F 2 2 Φ 2 (t) = Φ 1 (t) Φ 1 (t t). = Φ 1(t) t = ( 1.5e 0.5t 2.4e 4t 2e 10t ) τ < 0 t > τ Φ 2 (t) < 0 lim t Φ 2 (t) = 0

, 1 ( f n (x))dx d dx ( f n (x)) 1 f n (x)dx d dx f n(x) lim f n (x) = [, 1] x f n (x) = n x x 1 f n (x) = x f n (x) = x 1 x n n f n(x) = [, 1] f n (x

() Remrk I = [0, ] [x i, x i ]. (x : ) f(x) = 0 (x : ) ξ i, (f) = f(ξ i )(x i x i ) = (x i x i ) = ξ i, (f) = f(ξ i )(x i x i ) = 0 (f) 0.

4 4 4 a b c d a b A c d A a da ad bce O E O n A n O ad bc a d n A n O 5 {a n } S n a k n a n + k S n a a n+ S n n S n n log x x {xy } x, y x + y 7 fx

I A A441 : April 21, 2014 Version : Kawahira, Tomoki TA (Kondo, Hirotaka ) Google

D xy D (x, y) z = f(x, y) f D (2 ) (x, y, z) f R z = 1 x 2 y 2 {(x, y); x 2 +y 2 1} x 2 +y 2 +z 2 = 1 1 z (x, y) R 2 z = x 2 y

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

(1) θ a = 5(cm) θ c = 4(cm) b = 3(cm) (2) ABC A A BC AD 10cm BC B D C 99 (1) A B 10m O AOB 37 sin 37 = cos 37 = tan 37

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

nakao

70 : 20 : A B (20 ) (30 ) 50 1


I, II 1, A = A 4 : 6 = max{ A, } A A 10 10%

Python Speed Learning

DVIOUT

7. y fx, z gy z gfx dz dx dz dy dy dx. g f a g bf a b fa 7., chain ule Ω, D R n, R m a Ω, f : Ω R m, g : D R l, fω D, b fa, f a g b g f a g f a g bf a

2 7 V 7 {fx fx 3 } 8 P 3 {fx fx 3 } 9 V 9 {fx fx f x 2fx } V {fx fx f x 2fx + } V {{a n } {a n } a n+2 a n+ + a n n } 2 V 2 {{a n } {a n } a n+2 a n+

Part y mx + n mt + n m 1 mt n + n t m 2 t + mn 0 t m 0 n 18 y n n a 7 3 ; x α α 1 7α +t t 3 4α + 3t t x α x α y mx + n

数学の基礎訓練I

S I. dy fx x fx y fx + C 3 C vt dy fx 4 x, y dy yt gt + Ct + C dt v e kt xt v e kt + C k x v k + C C xt v k 3 r r + dr e kt S Sr πr dt d v } dt k e kt

B line of mgnetic induction AB MN ds df (7.1) (7.3) (8.1) df = µ 0 ds, df = ds B = B ds 2π A B P P O s s Q PQ R QP AB θ 0 <θ<π

Python3 Next 2

Transcription:

Python Matplotlib 2016 ver.0.06 matplotlib python 2 3 (ffmpeg ) Excel matplotlib matplotlib doc PDF 2,800 python matplotlib matplotlib matplotlib Gallery Matplotlib Examples 1 matplotlib 2 2 pyplot 2 2.1 1........................ 2 2.2........................... 3 2.3 numpy.................. 4 2.4................................... 5 3 numpy 6 3.1 numpy.................................... 6 3.2......................................... 8 3.3.......................................... 9 3.4.................................. 10 3.5.............................................. 11 A matplotlib 13 1

1 matplotlib matplotlib Python matplotlib numpy matplotlib Installing A 2 pyplot matplotlib 1 matplotlib.pyplot matplotlib.pyplot plt import import numpy as np import matplotlib.pyplot as plt numpy ns 2.1 1 [Kg] [cm] x 1, y 1 x 2, y 2 x 3, y 3 3 xy- plt 3 (x 1, y 1 ), (x 2, y 2 ) (x 3, y 3 ) simple plot00.py [ 1] 1 MacOX/Linux shell Shebang Windows (windows10) [ 2] 2 UTF-8 UTF-8 7 simple plot00.py 3 #.matplotlib/matplotlibrc 4 # font.family : IPAexGothic 5 # IPAex http://ipafont.ipa.go.jp 7 simple_plot00.py 8 1 3 9 10 import matplotlib.pyplot as plt 11 12 plt.plot(62, 173, ro ) 13 plt.plot(53, 163, ro ) 14 plt.plot(72, 170, ro ) 15 plt.xlim(50, 80) 16 plt.ylim(150, 180) 17 plt.xlabel(u [Kg] ) 18 plt.ylabel(u [cm] ) 19 plt.title(u ) 20 #plt.savefig( image/simple_plot00.png ) 21 plt.show() 12,13,14 plt.plot(x k, y k, ro ) x, y- x k y k (x k, y k ) 1 ro red circle( ) 15 x- 16 y- 2

17,18,19 x- y- plt.xlabel( ) plt.ylabel( ) plt.title( ) 21 plt.show() 20 PNG.png(PNG),.pdf(PDF),.eps(EPS),.svg(SVG) JPEG 2.1 simple plot00.py 1 1 simple plot00.py IPAex.matplotlib/matplotlibrc 2.2 simple plot00.py 15 plt.axis 2.2 simple plot00.py 1 plot n (x 1, y 1 ), (x 2, y 2 ), (x 3, y 3 ),..., (x n, y n ) x y 2 xlist, ylist xlist = [x 1, x 2, x 3,..., x n ] ylist = [y 1, y 2, y 3,..., y n ] simple plot0.py simple plot00.py 2 4 simple_plot0.py 5 3 xy- 7 import matplotlib.pyplot as plt 8 simple plot0.py 3

9 xlist = [62, 53, 72] 10 ylist = [173, 163, 170] 11 plt.plot(xlist, ylist, ro ) 12 plt.xlim(50, 80) 13 plt.ylim(150, 180) 14 plt.xlabel(u [Kg] ) 15 plt.ylabel(u [cm] ) 16 plt.title(u ) 17 #plt.savefig( image/simple_plot0.png ) 18 plt.show() 2.3 simple plot0.py simple plot00.py 2.3 numpy matplotlib x- y- f(x) I = [x a, x b ] I x a = x 0 < x 1 < x 2 < x 3 < < x n 1 < x n = x b x k f(x k ) (x k, f(x k )), k = 0,..., n 2 f(x) = x 2 [ 2, 2] 0.25 2.3 matplotlib func plot0.py Python range xrange 9 15 frange(startpt, endpt, step) 17 startpt endpt step xlist 18 21 2 flist 4 func_plot0.py 5 numpy 7 import matplotlib.pyplot as plt 8 9 def frange(startpt, endpt, step): 10 nlist = [startpt] 11 next = startpt + step func plot0.py 4

12 while next <= endpt: 13 nlist.append(next) 14 next += step 15 return(nlist) 16 17 xlist = frange(-2, 2, 0.25) 18 flist = [] 19 for x in xlist: 20 fx = x ** 2 21 flist.append(fx) 22 23 plt.plot(xlist, flist, ro ) 24 plt.xlim(-2,2) 25 plt.ylim(-0.5, 5) 26 plt.axhline(0, c= b, ls= -, lw=0.5)# x ( x=0) 27 plt.axvline(0, c= b, ls= -, lw=0.5)# y ( y=0) 28 plt.xlabel( x, fontsize=18) 29 plt.ylabel( f(x), fontsize=18) 30 31 plt.title( Graphs of f(x)=x ** 2 ) 32 #plt.savefig( image/func_plot0.png ) 33 plt.show() 2.4 func plot0.py [ 4, 4] 3 1 2 x3 + x 2 3x math [ π, π] sin (0, 20] log x, y- plt.xlim,plt.ylim 2.4 I = [0, 1) f : I I I x 0 I f O(f, x 0 ) x 0 O(f, x 0 ) = {x 0, x 1, x 2,..., x n,... }, x k+1 = f(x k ). 2 {(x k, x k+1 )} k=0,..., f {(x, y) y = f(x)} [0, 1) b(x) = 2x (mod 1) = 2x a(x), a(x) = 2x {0, 1} x [0, 1)] 2 x = k=1 a k (x) 2 k, a k (x) = a(b k (x)) (0, 1] g(x) = 1 1 x c(x), c(x) = N x x [0, 1)] 1 x = 1 c 1 (x) + 1 c 2 (x) +... 1 + c k (x) + 1..., c k (x) = c(g k (x)). 5

x 0 (0, 10 2 {(x k, x k+1 )} k=0,..., expansion.py 4 expansion.py 5 plotting orbit (x_i, x_{i+1}) of 1-dim expansion(binary and continued expansion) 7 import math 8 import matplotlib.pyplot as plt 9 10 def binary_expand(x): 11 return(2 * x - math.floor(2 * x)) 12 13 def cfraction_expand(x): 14 return(1/x - math.floor(1/x)) 15 16 N = 20000 17 x0 = math.sqrt(2)-1 18 19 xlist = [] 20 ylist = [] 21 22 for k in range(0,n): 23 x1 = binary_expand(x0) 24 # x1 = cfraction_expand(x0) 25 xlist.append(x0) 26 ylist.append(x1) 27 x0 = x1 28 29 plt.plot(xlist, ylist, r. ) 30 plt.show() f : D D n (dynamical system) 2.5 (0, 0) 1 2 expansion.py 3 numpy 2.3 f(x) f *1 3.1 numpy numpy python Python A Numpy User Guide numpy matplotlib numpy np import numpy as np *1 Python matplotlib 6

I = [a, b] 2 1. numpy.arange I = [a, b] dx xlist xlist = np.arange(a, b, dx) Python shell [ 2, 2] 0.5 x >>> import numpy >>> x = numpy.arange(-2, 2, 0.5) >>> x array([-2., -1.5, -1., -0.5, 0., 0.5, 1., 1.5]) numpy.arange array 2. numpy.linspace I = [a, b] n xlist xlist = np.linspace(a, b, n) n xlist = np.linspace(a, b) Python shell [ 2, 2] 20 x >>> x = numpy.linspace(-2, 2, 20) >>> x array([-2., -1.78947368, -1.57894737, -1.36842105, -1.15789474, -0.94736842, -0.73684211, -0.52631579, -0.31578947, -0.10526316, 0.10526316, 0.31578947, 0.52631579, 0.73684211, 0.94736842, 1.15789474, 1.36842105, 1.57894737, 1.78947368, 2. ]) [ 2, 2] x >>> x = numpy.linspace(-2, 2) >>> x array([-2., -1.91836735, -1.83673469, -1.75510204, -1.67346939, -1.59183673, -1.51020408, -1.42857143, -1.34693878, -1.26530612, -1.18367347, -1.10204082, -1.02040816, -0.93877551, -0.85714286,...... 0.85714286, 0.93877551, 1.02040816, 1.10204082, 1.18367347, 1.26530612, 1.34693878, 1.42857143, 1.51020408, 1.59183673, 1.67346939, 1.75510204, 1.83673469, 1.91836735, 2. ]) 3.1 Python shell I = [ π, π] 0.2 numpy.arange 3.2 Python shell I = [ π, π] numpy.linspace 50 π numpy.pi numpy numpy xlist=[x 0, x 1,..., x n ] flist=[f(x 0 ), f(x 1 ),..., f(x n )] for 7

f(xlist) f(x) x 2 3.3 >>> x = numpy.linspace(-2, 2, 10) >>> x array([-2., -1.55555556, -1.11111111, -0.66666667, -0.22222222, >>> x ** 2 0.22222222, 0.66666667, 1.11111111, 1.55555556, 2. ]) array([ 4., 2.41975309, 1.2345679, 0.44444444, 0.04938272, 0.04938272, 0.44444444, 1.2345679, 2.41975309, 4. ]) Python shell x 3 numpy func plot10.py numpy.linspace 8 func plot1.py func plot1.py 4 func_plot1.py 5 numpy 7 import numpy as np 8 import matplotlib.pyplot as plt 9 10 x = np.linspace(-2, 2, 8) 11 plt.plot(x, x ** 2, ro ) 12 #plt.plot(x, x ** 2, b- ) 13 plt.xlim(-2,2) 14 plt.ylim(-0.5, 5) 15 plt.axhline(0, color= b, ls= -, lw=0.5)# x ( x=0) 16 plt.axvline(0, color= b, ls= -, lw=0.5)# y ( y=0) 17 plt.xlabel(r $x$, fontsize=18) 18 plt.ylabel(r $f(x)$, fontsize=18) 19 20 plt.title(r Graphs of $f(x)=x^2$, fontsize=20) 21 #plt.savefig( image/func_plot1.png ) 22 plt.show() 3.2 plot ro 1 8

red r blue b green g cyan c magenta m yellow y black k white w 1 matplotlib (color)., o v ^ < > s 5 p 6 h 6 2 H 8 8 * D d 2 matplotlib (marker) 3.4 markersize plt.plot(xlist, ylist, b+, markersize=10) 3.5 3.3 3.6 func plot1.py 12 # 2 12 plt.plot b- 11 12 9

2 ( 8) 3.4 plot ro b- color makrker ls linestyle func plot2.py [ π, π] cos, sin, tan 3 13 marker= s ls= None tan(x) 11,12,13 plot label 18 plt.legend() func plot2.py 4 simple_plot2.py 5 7 import numpy as np 8 import matplotlib.pyplot as plt 9 10 x = np.linspace(-np.pi, np.pi) 11 plt.plot(x, np.cos(x), color= r, ls= -, label= cos ) 12 plt.plot(x, np.sin(x), color= b, ls= -, label= sin ) 13 plt.plot(x, np.tan(x), color= c, marker= s, ls= None, label= tan ) 14 plt.xlim(-np.pi, np.pi) 15 plt.ylim(-1.5,1.5) 16 plt.axhline(0, ls= -, c= b, lw=0.5)# x ( x=0) 17 plt.axvline(0, ls= -, c= b, lw=0.5)# y ( y=0) 18 plt.legend()# 19 plt.xlabel( x ) 20 plt.ylabel( y ) 21 22 plt.title( Graphs of Trigonometric functions ) 23 #plt.savefig( image/func_plot2.png ) 24 plt.show() 3.7 func plot2.py 10

3 [ π, π] sin(x), cos(x) tan(x) 3.5 plot ls 3 solid - dashed -- dashdot -. dotted : None 3 matplotlib (line style) plot linewidth lw func plot3.py [ π, π] sin(x), sin(x + 1), sin(x + 2),sin(x + 3), sin(x + 4) 4 func plot3.py 4 simple_plot3.py 5 7 import numpy as np 8 import matplotlib.pyplot as plt 9 10 x = np.linspace(-np.pi, np.pi) 11 plt.plot(x, np.cos(x), color= r, ls= -, lw=1.0, label= lw=1 ) 12 plt.plot(x, np.cos(x+1), color= b, ls= -, lw=2.0, label= lw=2 ) 13 plt.plot(x, np.cos(x+2), color= g, ls= -, lw=3.0, label= lw=3 ) 14 plt.plot(x, np.cos(x+3), color= c, ls= -, lw=4.0, label= lw=4 ) 15 plt.plot(x, np.cos(x+4), color= m, ls= -, lw=5.0, label= lw=5 ) 16 plt.xlim(-np.pi, np.pi) 17 plt.ylim(-1.5,1.5) 18 plt.axhline(0, ls= -, c= b, lw=0.5)# x ( x=0) 19 plt.axvline(0, ls= -, c= b, lw=0.5)# y ( y=0) 20 plt.legend()# 11

21 plt.xlabel( x ) 22 plt.ylabel( y ) 23 24 plt.title( Variation of Line widths ) 25 #plt.savefig( image/func_plot3.png ) 26 plt.show() 3.8 func plot3.py 4 [ π, π] sin (Lissajous) xy- (x, y) t x(t) = sin ωt, y(t) = cos t ω > 0 ω lissajous.py lissajous.py 4 lissajous.py 5 sin(omega * t), cos(t)) 7 import numpy as np 8 import matplotlib.pyplot as plt 9 10 omega = np.sqrt(3) 11 t = np.arange(0, 100, 0.1) 12 plt.plot(np.sin(omega * t), np.sin(t), b ) 13 14 plt.xlabel( x ) 15 plt.ylabel( y ) 16 plt.title(r Lissajous curve: $\omega$= + str(omega)) 17 #plt.savefig( image/lissajous.png ) 18 plt.show() 12

5 ω = 3 t 0 100 t 3.9 lissajous.py 10 omega 0.8 1.5 np.sqrt(3) A matplotlib 13