diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-03-10 14:59:14 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-03-10 14:59:14 +0100 |
| commit | 1100562e29f6476448b656dbddd4cf22505523f6 (patch) | |
| tree | 442eec492199104bd49dfd74474ce89ade8fcac9 /assets/posts/dna-sequence/chart-size.py | |
| parent | a40d80be378e46a6c490e1b99b0d8f4acd968503 (diff) | |
| download | mitjafelicijan.com-1100562e29f6476448b656dbddd4cf22505523f6.tar.gz | |
Move back to JBMAFP
Diffstat (limited to 'assets/posts/dna-sequence/chart-size.py')
| -rw-r--r-- | assets/posts/dna-sequence/chart-size.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/assets/posts/dna-sequence/chart-size.py b/assets/posts/dna-sequence/chart-size.py deleted file mode 100644 index 4fc408d..0000000 --- a/assets/posts/dna-sequence/chart-size.py +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | import csv | ||
| 2 | |||
| 3 | import matplotlib.pyplot as plt | ||
| 4 | import pandas as pd | ||
| 5 | |||
| 6 | # Read the data | ||
| 7 | df = pd.read_csv("benchmarks.csv") | ||
| 8 | |||
| 9 | # Settings | ||
| 10 | plt.title("Encode to FASTA out filesize") | ||
| 11 | plt.tight_layout(pad=2) | ||
| 12 | fig = plt.gcf() | ||
| 13 | fig.set_size_inches(10, 4) | ||
| 14 | |||
| 15 | # Plotting | ||
| 16 | plt.plot(df["Packages"], df["FASTA file size (KB)"], label = "Raw", color="black", linestyle="-") | ||
| 17 | plt.plot(df["Packages"], df["FASTA gzipped (KB)"], label = "Gzipped", color="black", linestyle="--") | ||
| 18 | |||
| 19 | # Adding x and y axis labels | ||
| 20 | plt.xlabel("Size of an input file", fontstyle="italic") | ||
| 21 | plt.ylabel("File size (KB)", fontstyle="italic") | ||
| 22 | |||
| 23 | # Legend | ||
| 24 | legend = plt.legend() | ||
| 25 | legend.get_frame().set_linewidth(0) | ||
| 26 | |||
| 27 | # Export as SVG | ||
| 28 | plt.savefig("chart-size.svg", format="svg") | ||
