add the notebook

This commit is contained in:
Yanick Champoux 2023-12-07 15:02:54 -05:00
parent 18eb1ef0dc
commit 9608209e8c

38
2023/graphs.qmd Normal file
View File

@ -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()
```