-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCEEplot.py
More file actions
102 lines (83 loc) · 2.7 KB
/
CEEplot.py
File metadata and controls
102 lines (83 loc) · 2.7 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import numpy as np
import matplotlib.pyplot as plt
def CEEplotter(impulse,diff,loci,upci,names):
lengthvec=np.zeros([1,impulse.shape[1]])
i=0
m=int(np.ceil(np.sqrt(len(names))))*100
n=int(np.ceil(np.sqrt(len(names))))*10
if diff=='Y':
while i < impulse.shape[1]:
lengthvec[i,0]=i+1
i=i+1
plt.ion()
fig1 = plt.figure(1)
adj = plt.subplots_adjust(hspace=0.6,wspace=0.4)
j=0
while j < impulse.shape[0]:
figsub = plt.subplot(m+n+j+1)
figsubtit1 = plt.title(names[n])
aaa = plt.plot(lengthvec,np.cumsum(impulse[:,j:j+1]))
j=j+1
plt.show
if diff=='N':
while i < impulse.shape[1]:
lengthvec[0,i]=i+1
i=i+1
zeroguy=np.zeros([1,impulse.shape[1]])
plt.ion()
fig1 = plt.figure(1)
adj = plt.subplots_adjust(hspace=0.6,wspace=0.4)
j=0
while j < len(names):
figsub = plt.subplot(m+n+j+1)
figsubtit1 = plt.title(names[j])
aaa = plt.plot(lengthvec[0,:],impulse[j,:],'b',lengthvec[0,:],impulse[j,:]+upci[j,:],'c',lengthvec[0,:],impulse[j,:]+loci[j,:],'c',lengthvec[0,:],zeroguy[0,:],'k')
j=j+1
plt.show
def CEEplotsimple(impulse,names):
i=0
m=int(np.ceil(np.sqrt(len(names))))*100
n=int(np.ceil(np.sqrt(len(names))))*10
lengthvec=np.zeros([1,impulse.shape[1]])
while i < impulse.shape[1]:
lengthvec[0,i]=i+1
i=i+1
zeroguy=np.zeros([1,impulse.shape[1]])
plt.ion()
fig1 = plt.figure(1)
adj = plt.subplots_adjust(hspace=0.6,wspace=0.4)
j=0
while j < len(names):
figsub = plt.subplot(m+n+j+1)
figsubtit1 = plt.title(names[j])
aaa = plt.plot(lengthvec[0,:],impulse[j,:],'b',lengthvec[0,:],zeroguy[0,:],'k')
j=j+1
plt.show
def simpleplot(impulse,names,var):
j=0
while j < len(names):
if names[j]==var:
index=j
j=j+1
i=0
lengthvec=np.zeros([1,impulse.shape[1]])
zeroguy=np.zeros([1,impulse.shape[1]])
while i < impulse.shape[1]:
lengthvec[0,i]=i+1
i=i+1
plt.ion()
fig1 = plt.figure(1)
figtitle=plt.title(var)
aaa=plt.plot(lengthvec[0,:],impulse[index,:],'b',lengthvec[0,:],zeroguy[0,:],'k')
plt.show
def simplot(impulse):
"""One dimensional"""
i=0
lengthvec=np.zeros([1,len(impulse)])
while i < len(impulse):
lengthvec[0,i]=i+1
i=i+1
plt.ion()
fig1 = plt.figure(1)
aaa=plt.plot(lengthvec[0,:],impulse[:])
plt.show