From 2836163e54e3b94342113314e70ee564c456c43e Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sun, 29 Oct 2023 14:41:39 +0100 Subject: Added public folder to git so it get get deployed on vercel --- public/posts/dna-sequence/chart-size.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 public/posts/dna-sequence/chart-size.py (limited to 'public/posts/dna-sequence/chart-size.py') diff --git a/public/posts/dna-sequence/chart-size.py b/public/posts/dna-sequence/chart-size.py new file mode 100644 index 0000000..4fc408d --- /dev/null +++ b/public/posts/dna-sequence/chart-size.py @@ -0,0 +1,28 @@ +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 out filesize") +plt.tight_layout(pad=2) +fig = plt.gcf() +fig.set_size_inches(10, 4) + +# Plotting +plt.plot(df["Packages"], df["FASTA file size (KB)"], label = "Raw", color="black", linestyle="-") +plt.plot(df["Packages"], df["FASTA gzipped (KB)"], label = "Gzipped", color="black", linestyle="--") + +# Adding x and y axis labels +plt.xlabel("Size of an input file", fontstyle="italic") +plt.ylabel("File size (KB)", fontstyle="italic") + +# Legend +legend = plt.legend() +legend.get_frame().set_linewidth(0) + +# Export as SVG +plt.savefig("chart-size.svg", format="svg") -- cgit v1.2.3