diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-10-29 14:41:39 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-10-29 14:41:39 +0100 |
| commit | 2836163e54e3b94342113314e70ee564c456c43e (patch) | |
| tree | 59b82fc69e83cc6d92846a8e9f510b0bb865cf3b /public/posts/dna-sequence/chart-speed.py | |
| parent | d50ea4053ea04abb3a455606d4591a8283af0677 (diff) | |
| download | mitjafelicijan.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.py | 23 |
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 @@ | |||
| 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 speed over time") | ||
| 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["Encode to FASTA (ms)"], label = "ALB", color="black", linestyle="--") | ||
| 17 | |||
| 18 | # Adding x and y axis labels | ||
| 19 | plt.xlabel("Size of an input file", fontstyle="italic") | ||
| 20 | plt.ylabel("Encoding time (ms)", fontstyle="italic") | ||
| 21 | |||
| 22 | # Export as SVG | ||
| 23 | plt.savefig("chart-speed.svg", format="svg") | ||
