File size: 616 Bytes
e391132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import json
from argparse import ArgumentParser

import matplotlib.pyplot as plt

parser = ArgumentParser()
parser.add_argument("input", type=str, help="Input file of json data, output of matching_series")
parser.add_argument("output", type=str, help="Output file of the plot")
args = parser.parse_args()

with open(args.input, "r") as f:
    data = json.load(f)

coverages = data["coverages"]
x = [2**i for i in range(len(coverages))]
y = coverages

fig, ax = plt.subplots()

ax.plot(x, y, "o-")
ax.set_xscale("log", base=2)
ax.set_xlabel("Number of generations")
ax.set_ylabel("Coverage")
plt.savefig(args.output)