aboutsummaryrefslogtreecommitdiff
path: root/static/posts/dna-sequence/chart-speed.py
diff options
context:
space:
mode:
authorMitja Felicijan <m@mitjafelicijan.com>2023-08-05 13:41:36 +0200
committerMitja Felicijan <m@mitjafelicijan.com>2023-08-05 13:41:36 +0200
commit057be23acf19acae0683c59b0a346b411a04880a (patch)
tree852fcf2ca92060b2e70401df446b572b7fd8d874 /static/posts/dna-sequence/chart-speed.py
parent2f5ea5f4982d6276881c9a3342ed8847ebc7d326 (diff)
downloadmitjafelicijan.com-057be23acf19acae0683c59b0a346b411a04880a.tar.gz
Cleanup of posts
Diffstat (limited to 'static/posts/dna-sequence/chart-speed.py')
-rw-r--r--static/posts/dna-sequence/chart-speed.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/static/posts/dna-sequence/chart-speed.py b/static/posts/dna-sequence/chart-speed.py
new file mode 100644
index 0000000..c07b057
--- /dev/null
+++ b/static/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")