aboutsummaryrefslogtreecommitdiff
path: root/public/posts/dna-sequence/chart-speed.py
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2023-10-29 14:41:39 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2023-10-29 14:41:39 +0100
commit2836163e54e3b94342113314e70ee564c456c43e (patch)
tree59b82fc69e83cc6d92846a8e9f510b0bb865cf3b /public/posts/dna-sequence/chart-speed.py
parentd50ea4053ea04abb3a455606d4591a8283af0677 (diff)
downloadmitjafelicijan.com-2836163e54e3b94342113314e70ee564c456c43e.tar.gz
Added public folder to git so it get get deployed on vercel
Diffstat (limited to 'public/posts/dna-sequence/chart-speed.py')
-rw-r--r--public/posts/dna-sequence/chart-speed.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/public/posts/dna-sequence/chart-speed.py b/public/posts/dna-sequence/chart-speed.py
new file mode 100644
index 0000000..c07b057
--- /dev/null
+++ b/public/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")