<commit_before>from numpy import *
import matplotlib
import matplotlib.pyplot as plt

errors = loadtxt('errors.txt')
resolutions = loadtxt('resolutions.txt')

poly = polyfit(log(errors),log(resolutions),1)

plt.loglog(resolutions, errors, '-o', label='error')
plt.loglog(resolutions, exp(poly[1])*resolutions**poly[0], '--', label='$\\mathcal{O}(N^{%.2f})$' % poly[0])
plt.legend()
plt.xlabel('resolution $N$')
plt.ylabel('$||\\cdot||_\\infty$')
plt.grid(True)
plt.show()<commit_msg>Fix order of arguments in plot_convergence.py<commit_after>from numpy import *
import matplotlib
import matplotlib.pyplot as plt

errors = loadtxt('errors.txt')
resolutions = loadtxt('resolutions.txt')

poly = polyfit(log(resolutions),log(errors),1)

plt.loglog(resolutions, errors, '-o', label='error')
plt.loglog(resolutions, exp(poly[1])*resolutions**poly[0], '--', label='$\\mathcal{O}(N^{%.2f})$' % poly[0])
plt.legend()
plt.xlabel('resolution $N$')
plt.ylabel('$||\\cdot||_\\infty$')
plt.grid(True)
plt.show()
{'fraction_non_alphanumeric': 0.2154308617234469, 'fraction_numerical': 0.01002004008016032, 'mean_word_length': 7.256198347107438, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5145620', 'n_tokens_mistral': 384, 'n_tokens_neox': 366, 'n_words': 62}