Skip to content

Commit 24dfbb6

Browse files
committed
test matplot
1 parent 9caedcc commit 24dfbb6

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

hello/TestMatplotlib.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
'''
2+
Created on 2018/04/08
3+
4+
@author: syuu
5+
'''
6+
import numpy
7+
from matplotlib import pyplot
8+
9+
t = numpy.arange(0.,5.,0.2)
10+
11+
pyplot.title("drawing example1")
12+
13+
14+
pyplot.plot(t,t,'r--',label='linear')
15+
pyplot.plot(t,t**2,'bs',label='square')
16+
pyplot.plot(t,t**3,'g^',label='cube')
17+
18+
pyplot.xlabel("x values")
19+
pyplot.ylabel("y values")
20+
21+
pyplot.legend()
22+
pyplot.show()
File renamed without changes.

hello/TestScipy.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'''
2+
Created on 2018/04/08
3+
4+
@author: syuu
5+
'''
6+
import numpy as np
7+
from scipy.cluster.hierarchy import linkage, dendrogram
8+
from matplotlib import pyplot
9+
10+
x=np.array([[1,2],[2,1],[3,4],[4,3]])
11+
z=linkage(x,'ward')
12+
dendrogram(z)
13+
pyplot.show()

0 commit comments

Comments
 (0)