From 057be23acf19acae0683c59b0a346b411a04880a Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sat, 5 Aug 2023 13:41:36 +0200 Subject: Cleanup of posts --- static/posts/dna-sequence/chart-speed.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 static/posts/dna-sequence/chart-speed.py (limited to 'static/posts/dna-sequence/chart-speed.py') 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 @@ +import csv + +import matplotlib.pyplot as plt +import pandas as pd + +# Read the data +df = pd.read_csv("benchmarks.csv") + +# Settings +plt.title("Encode to FASTA speed over time") +plt.tight_layout(pad=2) +fig = plt.gcf() +fig.set_size_inches(10, 4) + +# Plotting +plt.plot(df["Packages"], df["Encode to FASTA (ms)"], label = "ALB", color="black", linestyle="--") + +# Adding x and y axis labels +plt.xlabel("Size of an input file", fontstyle="italic") +plt.ylabel("Encoding time (ms)", fontstyle="italic") + +# Export as SVG +plt.savefig("chart-speed.svg", format="svg") -- cgit v1.2.3