-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot.py
39 lines (34 loc) · 1.27 KB
/
plot.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
import matplotlib as mpl
import matplotlib.pyplot as plt
import config
def plot(
non_sterile: config.Vector,
non_crispr: config.Vector,
crispr: config.Vector,
sterile: config.Vector,
total_pop: config.Vector,
) -> None:
"""Plots various different population categories."""
plt.style.use("fivethirtyeight")
mpl.rcParams["figure.figsize"] = [16, 9]
mpl.rcParams["figure.dpi"] = 90
mpl.rcParams["axes.titlepad"] = 25
mpl.rcParams["axes.titlesize"] = 15
mpl.rcParams["axes.titleweight"] = 700
mpl.rcParams["axes.labelpad"] = 25
mpl.rcParams["axes.labelsize"] = 14
mpl.rcParams["axes.labelweight"] = 700
mpl.rcParams["legend.fontsize"] = 14
mpl.rcParams["xtick.labelsize"] = 14
mpl.rcParams["ytick.labelsize"] = 14
plt.plot(non_sterile, lw=2, label="Healthy Males")
plt.plot(non_crispr, lw=2, label="Healthy Females")
plt.plot(crispr, lw=2, label="CRISPR Females")
plt.plot(sterile, lw=2, label="Sterile Males")
# plt.plot(total_pop, lw=2, label="Total population")
plt.xlabel("Cycles") # type: ignore
plt.ylabel("Population") # type: ignore
plt.title("Population with CRISPR introduced")
plt.legend()
plt.tight_layout(pad=2.5)
plt.show()