|
11 | 11 | # Define the data for each environment |
12 | 12 | data_coffee = { |
13 | 13 | 'EXPERIMENT_ID': [ |
14 | | - 'VLM feat. pred', 'Ours', 'No feat.', 'No invent', |
| 14 | + 'VLM feat. pred', 'Ours (pix2pred)', 'No feat.', 'No invent', |
15 | 15 | 'No subselect', 'No visual', 'VLM subselect', |
16 | 16 | 'ViLa', 'ViLa fewshot' |
17 | 17 | ], |
|
21 | 21 |
|
22 | 22 | data_combo_burger = { |
23 | 23 | 'EXPERIMENT_ID': [ |
24 | | - 'VLM feat. pred', 'Ours', 'No feat.', 'No invent', |
| 24 | + 'VLM feat. pred', 'Ours (pix2pred)', 'No feat.', 'No invent', |
25 | 25 | 'No subselect', 'No visual', 'VLM subselect', |
26 | 26 | 'ViLa', 'ViLa fewshot' |
27 | 27 | ], |
|
31 | 31 |
|
32 | 32 | data_fatter_burger = { |
33 | 33 | 'EXPERIMENT_ID': [ |
34 | | - 'VLM feat. pred', 'Ours', 'No feat.', 'No invent', |
| 34 | + 'VLM feat. pred', 'Ours (pix2pred)', 'No feat.', 'No invent', |
35 | 35 | 'No subselect', 'No visual', 'VLM subselect', |
36 | 36 | 'ViLa', 'ViLa fewshot' |
37 | 37 | ], |
|
41 | 41 |
|
42 | 42 | data_more_stacks = { |
43 | 43 | 'EXPERIMENT_ID': [ |
44 | | - 'VLM feat. pred', 'Ours', 'No feat.', 'No invent', |
| 44 | + 'VLM feat. pred', 'Ours (pix2pred)', 'No feat.', 'No invent', |
45 | 45 | 'No subselect', 'No visual', 'VLM subselect', |
46 | 46 | 'ViLa', 'ViLa fewshot' |
47 | 47 | ], |
|
51 | 51 |
|
52 | 52 | data_kitchen_boil_kettle = { |
53 | 53 | 'EXPERIMENT_ID': [ |
54 | | - 'VLM feat. pred', 'Ours', 'No feat.', 'No invent', |
| 54 | + 'VLM feat. pred', 'Ours (pix2pred)', 'No feat.', 'No invent', |
55 | 55 | 'No subselect', 'No visual', 'VLM subselect', |
56 | 56 | 'ViLa', 'ViLa fewshot' |
57 | 57 | ], |
|
68 | 68 |
|
69 | 69 | # Reorder the 'EXPERIMENT_ID' column to match 'custom_order' |
70 | 70 | custom_order = [ |
71 | | - 'Ours', 'VLM subselect', 'No subselect', 'No feat.', 'No visual', 'No invent', |
| 71 | + 'Ours (pix2pred)', 'VLM subselect', 'No subselect', 'No feat.', 'No visual', 'No invent', |
72 | 72 | 'VLM feat. pred', 'ViLa', 'ViLa fewshot' |
73 | 73 | ] |
74 | 74 |
|
|
86 | 86 | fig, axes = plt.subplots(1, 5, figsize=(18, 6), sharey=True) |
87 | 87 |
|
88 | 88 | # Assign a larger color palette for the bars, so that each bar has a unique color |
89 | | -unique_palette = sns.color_palette("pastel", n_colors=len(df_combo_burger)) |
| 89 | +# unique_palette = sns.color_palette("pastel", n_colors=len(df_combo_burger)) |
| 90 | + |
| 91 | +# Define custom colors for the bars (replace these with your hex codes) |
| 92 | +custom_colors = [ |
| 93 | + "#10a37f", "#e45756", "#f58518", "#ffbf00", "#b5d33d", |
| 94 | + "#6ec1e4", "#b980d1", "#444444", "#d8b88f" |
| 95 | +] |
| 96 | + |
| 97 | +# Repeat the custom colors for each environment if necessary |
| 98 | +custom_palette = custom_colors * (len(df_combo_burger) // len(custom_colors) + 1) |
| 99 | + |
90 | 100 |
|
91 | 101 | # Plot in the new order: 'Boil Kettle', 'More Stacks', 'Bigger Burger', 'Combo Burger', then Coffee |
92 | 102 | environments = [df_kitchen_boil_kettle, df_fatter_burger, df_more_stacks, df_combo_burger, df_coffee] |
93 | 103 | titles = ["Kitchen Boil Kettle", "Bigger Burger", "More Burger Stacks", "Combo Burger", "Coffee"] |
94 | 104 |
|
95 | 105 | for i, (df, title) in enumerate(zip(environments, titles)): |
96 | 106 | sns.barplot( |
97 | | - data=df, y='EXPERIMENT_ID', x='NUM_SOLVED', ax=axes[i], palette=unique_palette, capsize=0.1 |
| 107 | + data=df, y='EXPERIMENT_ID', x='NUM_SOLVED', ax=axes[i], palette=custom_palette[:len(df)], capsize=0.1 |
98 | 108 | ) |
99 | 109 | axes[i].errorbar( |
100 | 110 | df['NUM_SOLVED'], df['EXPERIMENT_ID'], |
101 | 111 | xerr=df['NUM_SOLVED_SE'], fmt='none', c='black', capsize=5, capthick=1 |
102 | 112 | ) |
103 | 113 | axes[i].set_title(title, fontsize=20) # Increase title font size |
104 | 114 | axes[i].set_xlabel('') # Clear individual x-labels |
105 | | - axes[i].set_ylabel('', fontsize=16) # Increase y-label font size |
106 | | - axes[i].tick_params(axis='both', labelsize=14) # Increase tick label size |
| 115 | + axes[i].set_ylabel('', fontsize=19) # Increase y-label font size |
| 116 | + axes[i].tick_params(axis='both', labelsize=18) # Increase tick label size |
107 | 117 | axes[i].grid(True, linestyle='--', alpha=0.6) # Add gridlines for clarity |
108 | 118 |
|
109 | 119 | # Set shared x-label |
110 | | -fig.text(0.5, 0.01, '% Evaluation Tasks Solved', ha='center', fontsize=18) |
| 120 | +fig.text(0.5, 0.01, '% Evaluation Tasks Solved', ha='center', fontsize=19) |
111 | 121 |
|
112 | 122 | # Adjust layout with tighter spacing |
113 | 123 | plt.tight_layout(rect=[0.02, 0.05, 1, 1]) |
|
0 commit comments