From f0d88ac1b34c6e2601cd3e18a4dcb688912293fe Mon Sep 17 00:00:00 2001 From: gestures Date: Fri, 10 Jul 2026 11:22:24 +0300 Subject: [PATCH 1/2] start for no int data --- fullplot_stats.py | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/fullplot_stats.py b/fullplot_stats.py index 657cf64..ce91670 100644 --- a/fullplot_stats.py +++ b/fullplot_stats.py @@ -50,7 +50,8 @@ def total_boxplot(DATA, creator = 'any', tester = 'any', simulation = "dummy sim #print(len(data_to_plot), len(labels)) - elements = ax.boxplot(data_to_plot, patch_artist=True, tick_labels=labels) + median_styling = {'color': 'black', 'linewidth': 2} + elements = ax.boxplot(data_to_plot, patch_artist=True, tick_labels=labels, medianprops=median_styling) for i, patch in enumerate(elements['boxes']): patch.set_facecolor(colors_list[(i)%10]) @@ -115,9 +116,26 @@ def convert_score(data): return score_new +# DATA[name] = {name: [scores]} +def no_interface_plot(DATA): + + species = list(DATA.keys()) + penguin_means = { + 'Int': [], + 'Not Int': []} + + for creator, Data in DATA.items(): + for tester, data in Data.items(): + pass + + fig, ax = plt.subplots() + print(DATA.keys()) + + + if __name__ == '__main__': - global_path = "/home/gestures6/Easy_sim/dummy_simulation/stats/" + global_path = "/home/gestures/Easy_sim/dummy_simulation/stats/" # 1. Name (Dima) # 2. Name-Name (Dima-Elisey) @@ -153,12 +171,14 @@ if __name__ == '__main__': total_boxplot(DATA, creator = 'any', tester = 'any') - for name in DATA.keys(): + no_interface_plot(DATA) + + #for name in DATA.keys(): - total_boxplot(DATA, creator = name, tester = 'any') - total_boxplot(DATA, creator = 'any', tester = name) + #total_boxplot(DATA, creator = name, tester = 'any') + #total_boxplot(DATA, creator = 'any', tester = name) - heat_map(DATA) + #heat_map(DATA) plt.show() From 052db363d726cf706dcdb241a0ed716b300fec80 Mon Sep 17 00:00:00 2001 From: gestures Date: Fri, 10 Jul 2026 15:54:49 +0300 Subject: [PATCH 2/2] bar plot --- fullplot_stats.py | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/fullplot_stats.py b/fullplot_stats.py index ce91670..12f0052 100644 --- a/fullplot_stats.py +++ b/fullplot_stats.py @@ -118,18 +118,45 @@ def convert_score(data): # DATA[name] = {name: [scores]} def no_interface_plot(DATA): - - species = list(DATA.keys()) - penguin_means = { - 'Int': [], - 'Not Int': []} - + n = 0 + names_with = []#DATA.keys() + names_without = [] for creator, Data in DATA.items(): for tester, data in Data.items(): - pass - - fig, ax = plt.subplots() - print(DATA.keys()) + if tester == creator: + if 'NoInt' in creator: + pass + else: + names_with.append(creator) + names_without.append(creator+'NoInt') + #print(len(names_with), names_with) + #print(len(names_without), names_without) + ''' + for tester, data in Data.items(): + if tester == creator: + del DATA[] + ''' + penguin_means = { + 'With interface': [np.median(DATA[name][name]) for name in names_with], + 'Without interface': [np.median(DATA[name][name]) for name in names_without]} + + x = np.arange(len(names_with)) # the label locations + width = 0.25 # the width of the bars + multiplier = 0 + + fig, ax = plt.subplots(layout='constrained') + + for attribute, measurement in penguin_means.items(): + offset = width * multiplier + rects = ax.bar(x + offset, np.round(measurement,2), width, label=attribute) + ax.bar_label(rects, padding=3) + multiplier += 1 + ax.set_ylabel('Score') + ax.set_title('Change in scores with visual interface disabled') + ax.set_xticks(x + width, names_with) + ax.legend(loc='upper left', ncols=3) + ax.set_ylim(0, 100) + ax.grid(axis='y')