|
229 | 229 | # if application_xlims[data_label]: |
230 | 230 | # ax_ci_ex.set_xlim(*application_xlims[data_label]) |
231 | 231 |
|
232 | | - fig_ex.savefig(os.path.join(fig_dir, f'application_{data_label}.png')) |
233 | | - fig_ex.savefig(os.path.join(fig_dir, f'application_{data_label}.svg'), transparent=True) |
| 232 | + fig_ex.savefig(os.path.join(fig_dir, f'application_{data_label}.png')) |
| 233 | + fig_ex.savefig(os.path.join(fig_dir, f'application_{data_label}.svg'), transparent=True) |
| 234 | + fig_ex.savefig(os.path.join(fig_dir, f'application_{data_label}.pdf'), transparent=True) |
234 | 235 |
|
235 | 236 | if output_application_vary_cases[data_label]: |
236 | | - |
| 237 | + |
237 | 238 | assert "Mix_C" in scores and "Mix_N" in scores |
238 | 239 | res_file = os.path.join(out_dir, f"pe_results_vary_cases_{data_label}.pkl") |
239 | 240 |
|
|
291 | 292 | df_construct = pd.read_pickle(res_file) |
292 | 293 |
|
293 | 294 | # Plot results |
294 | | - print("Plotting analysis of p_C vs. constructed p_C with {} scores...".format(data_label), flush=True) |
| 295 | + print(f"Plotting analysis of p_C vs. constructed p_C with {data_label} scores...", flush=True) |
295 | 296 | with sns.axes_style("whitegrid"): |
296 | 297 | fig, axes = plt.subplots(nrows=1, ncols=len(methods), sharex=True, sharey=True, figsize=(fig_width, fig_width/3)) |
297 | 298 | df_construct_tidy = df_construct.melt(var_name="Method", |
|
316 | 317 |
|
317 | 318 | fig.savefig(os.path.join(fig_dir, f'estimation_test_{data_label}.png')) |
318 | 319 | fig.savefig(os.path.join(fig_dir, f'estimation_test_{data_label}.svg'), transparent=True) |
| 320 | + fig.savefig(os.path.join(fig_dir, f'estimation_test_{data_label}.pdf'), transparent=True) |
319 | 321 |
|
320 | 322 |
|
321 | 323 | if output_characterisation[data_label]: |
|
328 | 330 |
|
329 | 331 | # Plot point estimates of p1 |
330 | 332 | if bool(point_estimates): |
331 | | - print("Plotting characterisation of {} scores...".format(data_label), flush=True) |
| 333 | + print(f"Plotting characterisation of {data_label} scores...", flush=True) |
332 | 334 | fig = plot_characterisation(point_estimates, proportions, sample_sizes, average=average) |
333 | | - fig.savefig(os.path.join(fig_dir, 'point_characterise_{}.png'.format(data_label))) |
334 | | - fig.savefig(os.path.join(fig_dir, 'point_characterise_{}.svg'.format(data_label)), transparent=True) |
| 335 | + fig.savefig(os.path.join(fig_dir, f'point_characterise_{data_label}.png')) |
| 336 | + fig.savefig(os.path.join(fig_dir, f'point_characterise_{data_label}.svg'), transparent=True) |
| 337 | + fig.savefig(os.path.join(fig_dir, f'point_characterise_{data_label}.pdf'), transparent=True) |
335 | 338 |
|
336 | 339 | # Plot bootstrapped estimates of p1 |
337 | 340 | if False: # bool(boots_estimates): |
|
469 | 472 | mix_dfs[s].append(pd.read_pickle(mix_dist_file)) |
470 | 473 |
|
471 | 474 | # Plot selected violins |
472 | | - print("Plotting violins of constructed mixtures with {} scores...".format(data_label), flush=True) |
| 475 | + print(f"Plotting violins of constructed mixtures with {data_label} scores...", flush=True) |
473 | 476 | plot_mixes = [selected_mix] |
474 | 477 | figsize = (fig_width, len(sizes)*fig_width*0.3) |
475 | 478 | for mix in plot_mixes: # range(n_seeds): |
|
482 | 485 | figsize=figsize) |
483 | 486 | fig.savefig(os.path.join(fig_dir, f'violin_selection_{mix}_{data_label}.png')) |
484 | 487 | fig.savefig(os.path.join(fig_dir, f'violin_selection_{mix}_{data_label}.svg'), transparent=True) |
| 488 | + fig.savefig(os.path.join(fig_dir, f'violin_selection_{mix}_{data_label}.pdf'), transparent=True) |
485 | 489 |
|
486 | 490 |
|
487 | 491 |
|
|
0 commit comments