From 9608209e8c137cf6df4f5767f789cd3ebc27ef20 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Thu, 7 Dec 2023 15:02:54 -0500 Subject: [PATCH] add the notebook --- 2023/graphs.qmd | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 2023/graphs.qmd diff --git a/2023/graphs.qmd b/2023/graphs.qmd new file mode 100644 index 0000000..ebb92c5 --- /dev/null +++ b/2023/graphs.qmd @@ -0,0 +1,38 @@ +```{python} +#| echo: false +#| output: asis + +import yaml +from yaml.loader import SafeLoader +import pandas as pd +import seaborn as sns + +data = pd.read_json('./benchmark.json',lines=True) +``` + +```{python} + +data = pd.DataFrame(data) + + +import matplotlib.pyplot as plt + +plt.close('all') + +#plt.scatter(data['day'],data['persec']) +#plt.show() + + +import seaborn.objects as so +from matplotlib.ticker import MaxNLocator + +data['day'] = data['day'].astype(int) + + +face_grid = sns.relplot( data=data, x="day", y="persec", hue="language", style="part" ) +fig = face_grid.figure +ax = fig.gca() +ax.xaxis.set_major_locator(MaxNLocator(integer=True)) +plt.yscale('log') +plt.show() +``` \ No newline at end of file