Last active
March 7, 2023 00:21
-
-
Save olepbr/7de38f9c45ec6683661cbdffc6984f4f to your computer and use it in GitHub Desktop.
Plot & describe results of web framework energy efficiency results
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import pandas as pd | |
import seaborn as sns | |
data: pd.DataFrame = pd.read_csv("results.csv") | |
sns.violinplot(data=data, x="Framework", y="Energy (J)", order=["ASP.NET Core", "Actix", "Express", "Django", "Laravel"], scale="width") | |
plt.savefig("vioplot.png") | |
data.groupby("Framework").describe() | |
# Get rid of Laravel; it clutters the plot. | |
data_without_lar = data[data["Framework"] != "Laravel"] | |
sns.violinplot(data=data_without_lar, x="Framework", y="Energy (J)", order=["ASP.NET Core", "Actix", "Express", "Django"], scale="width") | |
plt.savefig("without_lar.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment