-
Notifications
You must be signed in to change notification settings - Fork 1
/
Graphing.py
45 lines (34 loc) · 1.48 KB
/
Graphing.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
import TestG1S as m
import pysb.bng
from pysb.integrate import odesolve #import odesolve to solve equations
import pysb.bng
import pylab as pl #import pylab to do plotting
t = pl.linspace(0, 2000) #defines a time period (0 to 2000 seconds)
yout = odesolve(m.model, t) #solves equations for the model over the specified time period
#Graph 1
pl.ion() #starts interactive mode
pl.figure() #creates a figure
#Say what to plot with a label for each
pl.plot(t,yout['obsCea'], label = "Active Cyclin E")
pl.plot(t,yout['obsCdk2i'], label = "Inactive Cdk2")
pl.plot(t,yout['obsCdk2a'], label = "Active Cdk2")
pl.plot(t,yout['obsCe_Cdk2i'], label = "Inactive Cyclin E/Cdk2 Complex")
pl.plot(t,yout['obsCe_Cdk2a'], label = "Active Cyclin E/Cdk2 Complex")
pl.plot(t,yout['obsCe_Cdk2a_p27'], label = "Inactive Cyclin E/Cdk2/p27_p21 Complex")
pl.plot(t,yout['obsp27_p21u'], label = "Unphosphorylated p27_p21")
pl.plot(t,yout['obsp27_p21p'], label = "Phosphorylated p27_p21")
#Create a legend for the graph
pl.legend()
pl.xlabel("Time (s)")
pl.ylabel("Molecules/cell")
#Display graph
pl.show()
t = pl.linspace(0, 200000) #defines a time period (0 to 2000 seconds)
yout = odesolve(m.model, t) #solves equations for the model over the specified time period
#Graph 2
pl.ion()
pl.figure()
#What to plot:
pl.plot(t,yout['obsCDC25i'], label = "Inactive CDC25")
pl.plot(t,yout['obsCDC25a'], label= "Active CDC25")
pl.show()