-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathone_off_plot.py
More file actions
55 lines (40 loc) · 1.44 KB
/
Copy pathone_off_plot.py
File metadata and controls
55 lines (40 loc) · 1.44 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
import os
from os.path import join
import matplotlib
from matplotlib import pyplot as plt
from one_off_plot_data import hit, wtgs, hit_name
from replicate_set_timeline import ReplicateSetTimeline
from timeline import Timeline
class MergedReplicateSetTimeline(ReplicateSetTimeline):
def get_times(self):
return list(range(0, 612, 12))
@staticmethod
def fit_colors():
fit_colors = list(matplotlib.colors.TABLEAU_COLORS.keys()) + list(matplotlib.colors.BASE_COLORS.keys())
return fit_colors
@staticmethod
def get_colors():
colors = list(matplotlib.colors.XKCD_COLORS.keys())
return colors
@staticmethod
def plot_legend(ax, color, i, k_cat, k_m, max_y, r_squared):
pass
def main():
merged_rstl = MergedReplicateSetTimeline('all data', [])
for i, array in enumerate(hit):
name = hit_name + ' ' + str(i)
hit_tl = Timeline(name)
hit_tl.absorbances = array
merged_rstl.timelines[name] = hit_tl
for i, array in enumerate(wtgs):
name = 'wild-type glutamine synthetase ' + str(i)
wtgs_tl = Timeline(name)
wtgs_tl.absorbances = array
merged_rstl.timelines[name] = wtgs_tl
merged_rstl.fit()
title = "test " + hit_name + " and wild-type GS on one plot"
fig = merged_rstl.bundle_plot(title_override=title)
fig.savefig(join(os.getcwd(), title + '.png'))
plt.close(fig)
if __name__ == '__main__':
main()