-
Notifications
You must be signed in to change notification settings - Fork 0
/
Drawing1.py
86 lines (37 loc) · 848 Bytes
/
Drawing1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import numpy as np
from pandas import Series,DataFrame
import matplotlib.pyplot as plt
get_ipython().run_line_magic('matplotlib', 'inline')
# In[2]:
nd = np.linspace(0,100, num=50)
s = Series(nd)
s.plot()
# In[4]:
s.cumsum().plot()
# In[3]:
df = DataFrame(np.random.randint(0,30,size=(10,4)),index=list('abcdefghij'),
columns=list('ABCD'))
df
# In[4]:
df.plot(title='DataFrame')
# In[5]:
df.plot(kind = 'bar')
# In[10]:
df.plot(kind = 'barh')
# In[6]:
nd = np.random.randint(0,5,size=10)
s=Series(nd)
# In[9]:
nd
# In[7]:
s.hist()
# In[18]:
nd1 = np.random.randint(0,50,size=(50,5))
df1=DataFrame(nd1,columns=list('XYABC'))
df1.plot(x='X',y='Y',kind='scatter')
# In[19]:
pd.plotting.scatter_matrix(df1,diagonal='kde')