|
2180 | 2180 | " ticks_to_plot: list, \n", |
2181 | 2181 | " show_mini_meta: bool, \n", |
2182 | 2182 | " show_delta2: bool, \n", |
2183 | | - " table_kwargs: dict\n", |
| 2183 | + " table_kwargs: dict,\n", |
| 2184 | + "\n", |
| 2185 | + " ticks_to_skip: list\n", |
2184 | 2186 | " ):\n", |
2185 | 2187 | " \"\"\"\n", |
2186 | 2188 | " Add table axes for showing the deltas for horizontal plots.\n", |
|
2201 | 2203 | " Whether to show the delta-delta.\n", |
2202 | 2204 | " table_kwargs : dict\n", |
2203 | 2205 | " Keyword arguments for the table.\n", |
| 2206 | + "\n", |
| 2207 | + " ticks_to_skip: list\n", |
| 2208 | + " List of ticks to skip in the table.\n", |
2204 | 2209 | " \"\"\"\n", |
2205 | 2210 | "\n", |
2206 | 2211 | " table_color = table_kwargs['color']\n", |
2207 | 2212 | " table_alpha = table_kwargs['alpha']\n", |
2208 | 2213 | " table_font_size = table_kwargs['fontsize'] if table_kwargs['text_units'] == None else table_kwargs['fontsize']-2\n", |
2209 | 2214 | " table_text_color = table_kwargs['text_color']\n", |
2210 | 2215 | " text_units = '' if table_kwargs['text_units'] == None else table_kwargs['text_units']\n", |
2211 | | - " table_gap_dashes = table_kwargs['paired_gap_dashes'] # Currently unused\n", |
| 2216 | + " control_marker = table_kwargs['control_marker'] # Currently unused\n", |
2212 | 2217 | " fontsize_label = table_kwargs['fontsize_label']\n", |
2213 | 2218 | " label = table_kwargs['label']\n", |
2214 | 2219 | "\n", |
|
2229 | 2234 | " else:\n", |
2230 | 2235 | " new_ticks = ticks_to_plot.copy()\n", |
2231 | 2236 | " for i,loc in zip(tab.index, new_ticks):\n", |
2232 | | - " ax.text(0.5, loc, \"{:+.2f}\".format(tab.iloc[i,0])+text_units,ha=\"center\", va=\"center\", color=table_text_color,size=table_font_size)\n", |
2233 | | - "\n", |
2234 | | - " # ### Plot the dashes\n", |
2235 | | - " # if show_mini_meta or show_delta2:\n", |
2236 | | - " # no_contrast_positions = list(set([int(x-0.5) for x in ticks_to_plot[:-1]]) ^ set(np.arange(2,Num_Exps+2,1)))\n", |
2237 | | - " # else:\n", |
2238 | | - " # no_contrast_positions = list(set([int(x-0.5) for x in ypos]) ^ set(np.arange(0,Num_Exps,1)))\n", |
2239 | | - "\n", |
2240 | | - " # if table_gap_dashes or not is_paired or multi_paired_control:\n", |
2241 | | - " # if not (mini_meta or delta2):\n", |
2242 | | - " # for i in no_contrast_positions:\n", |
2243 | | - " # rawdata_axes.table_axes.text(0.5, i+1, \"—\",ha=\"center\", va=\"center\", color=table_text_color,size=table_font_size)\n", |
| 2237 | + " ax.text(0.5, loc, \"{:+.2f}\".format(tab.iloc[i,0])+text_units, ha=\"center\", va=\"center\", color=table_text_color, size=table_font_size)\n", |
2244 | 2238 | "\n", |
| 2239 | + " # Plot the dashes\n", |
| 2240 | + " if control_marker is not None:\n", |
| 2241 | + " for loc in ticks_to_skip:\n", |
| 2242 | + " ax.text(0.5, loc, control_marker, ha=\"center\", va=\"center\", color=table_text_color, size=table_font_size)\n", |
2245 | 2243 | "\n", |
2246 | 2244 | " ### Parameters for table\n", |
2247 | 2245 | " ax.axvspan(0, 1, facecolor=table_color, alpha=table_alpha) #### Plot the background color\n", |
|
0 commit comments