aboutsummaryrefslogtreecommitdiff
path: root/static/assets/posts/dna-sequence/chart-speed.py
diff options
context:
space:
mode:
Diffstat (limited to 'static/assets/posts/dna-sequence/chart-speed.py')
-rw-r--r--static/assets/posts/dna-sequence/chart-speed.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/static/assets/posts/dna-sequence/chart-speed.py b/static/assets/posts/dna-sequence/chart-speed.py
new file mode 100644
index 0000000..c07b057
--- /dev/null
+++ b/static/assets/posts/dna-sequence/chart-speed.py
@@ -0,0 +1,23 @@
1import csv
2
3import matplotlib.pyplot as plt
4import pandas as pd
5
6# Read the data
7df = pd.read_csv("benchmarks.csv")
8
9# Settings
10plt.title("Encode to FASTA speed over time")
11plt.tight_layout(pad=2)
12fig = plt.gcf()
13fig.set_size_inches(10, 4)
14
15# Plotting
16plt.plot(df["Packages"], df["Encode to FASTA (ms)"], label = "ALB", color="black", linestyle="--")
17
18# Adding x and y axis labels
19plt.xlabel("Size of an input file", fontstyle="italic")
20plt.ylabel("Encoding time (ms)", fontstyle="italic")
21
22# Export as SVG
23plt.savefig("chart-speed.svg", format="svg")