# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import os
import json
import math
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure

file = open(os.path.relpath('./test/log.json', os.path.abspath('')))

data = json.load(file)

figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')

mean = np.array([np.mean(data[i]["t"]) for i in range(len(data))])
std = np.array([np.std(data[i]["t"], ddof=1) for i in range(len(data))])

plt.title("Sudoku - Coloração de Grafos", fontsize=16)
plt.bar(['4','6','8','9'], mean)
plt.ylabel('Média do tempo de execução (microssegundos)',fontsize=14)
plt.xlabel('N',fontsize=14)
plt.show()

figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')

plt.title("Sudoku - Coloração de Grafos", fontsize=16)
plt.bar(['4','6','8','9'], std)
plt.ylabel('Desvio padrão do tempo de execução (microssegundos)',fontsize=14)
plt.xlabel('N',fontsize=14)
plt.show()
# -



StarcoderdataJupyterScriptsDedupFiltered