<jupyter_start><jupyter_text>diagrams - list of arrays Each array consists of two numbers. Maximim - maximum loss. It will appear as a blue point. You can set this parameter to 0.1 in order to maintain the beauty of a plot<jupyter_code>def plot_bar(diagrams, maximum):
    #diagrams = np.loadtxt(name)
    params = {'legend.fontsize': 'x-large',
              'figure.figsize': (15, 5),
             'axes.labelsize': 10,
             'axes.titlesize':30,
             'xtick.labelsize':20,
             'ytick.labelsize':20}
    pylab.rcParams.update(params)
    
    
    from matplotlib.pyplot import figure
    array1 = np.arange(diagrams[-1][0], diagrams[-2][1], 0.001)
    array2 = np.ones(len(array1))
    plt.figure(figsize=(10,10))
#   plt.scatter(0, maximum, linestyle='dashed', color = "blue") #draw of the maximum
    plt.plot(array2, array1, linestyle='dashed', color = "blue", markersize=12)
#     plt.bar(1, diagrams[-2][1] - diagrams[-1][0], width = 0.01, bottom= diagrams[-1][0] )
#     for j in np.arange(diagrams[-1][0], diagrams[-2][1], 0.001):
#         plt.scatter(1, j, color = 'b',  s = 0.05)
    for i in range(len(diagrams[:-1])):
        bar1 = diagrams[i]
        #print(i)
        a = bar1[0]
        b = bar1[1]
        array1 = np.arange(a, b, 0.001)
        array2 = (i + 2) * np.ones(len(array1))
        plt.plot(array2, array1, color = 'r')
        #plt.bar(2+i, b - a, width = 0.01, bottom= a, color = 'r')
#         for j in np.arange(a, b, 0.01):
#             plt.scatter(2+i, j, color = 'r')
        
#         plt.hlines(y=1, xmin=diagrams[-1][0], xmax=diagrams[-2][1], linewidth=1, color='b')
#         plt.hlines(y=2 + i, xmin=a, xmax=b, linewidth=1, color='r')
        plt.xticks(np.arange(0,len(diagrams)+101,100))
        pylab.text (0.8, diagrams[-2][1], r'$\infty$', fontsize = 30)
        #plt.xticks([a,b])
    plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17990531299316148, 'fraction_numerical': 0.052603892688058915, 'mean_word_length': 2.6436781609195403, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '559881', 'license': 'MIT', 'n_tokens_mistral': 779, 'n_tokens_neox': 718, 'n_words': 159, 'path': 'notebooks/bar_code_plot.ipynb', 'repo_name': 'daniil-777/BarCode', 'size': '1901'}