@@ -183,7 +183,11 @@ per_image_category_gg <- (
183183 + facet_grid(
184184 " Mitocheck_Plot_Label~Model_Feature_Type"
185185 )
186- + geom_text(data = percent_summary_df , aes(label = add_plot_text , x = 12 , y = 0.8 ))
186+ + geom_text(
187+ data = percent_summary_df ,
188+ aes(label = add_plot_text , x = 12 , y = 0.7 ),
189+ size = 5
190+ )
187191 + labs(
188192 x = " Average rank of correct label\n (per held out image)" ,
189193 y = " Average probability of correct label\n (per held out image)"
@@ -198,7 +202,7 @@ per_image_category_gg <- (
198202 )
199203 + geom_vline(xintercept = 2 , linetype = " dashed" , color = " red" )
200204 + theme(
201- strip.text = element_text(size = 8.3 ),
205+ strip.text = element_text(size = 11 ),
202206 )
203207 + guides(
204208 color = guide_legend(
@@ -337,15 +341,18 @@ correct_pred_proportion_gg <- (
337341 color = " black" ,
338342 aes(label = count ),
339343 nudge_x = 0.07 ,
340- size = 3
344+ size = 4
341345 )
342346 + facet_grid(
343347 " Model_Feature_Type~correct_pred" ,
344348 labeller = labeller(correct_pred = custom_labeller , Shuffled = shuffled_labeller )
345349 )
346350 + theme_bw()
347351 + phenotypic_ggplot_theme
348- + theme(axis.text = element_text(size = 7.5 ))
352+ + theme(
353+ axis.text = element_text(size = 9.5 ),
354+ strip.text = element_text(size = 11 )
355+ )
349356 + scale_fill_manual(
350357 paste0(" Does cell\n pass strict\n threshold?\n (p = " , high_threshold , " )" ),
351358 values = focus_corr_colors ,
@@ -447,7 +454,8 @@ correct_class_phenotype_pred_gg <- (
447454 ),
448455 color = " black" ,
449456 aes(label = total_count ),
450- nudge_y = 0.12
457+ nudge_y = 0.12 ,
458+ size = 4
451459 )
452460 + coord_flip()
453461 + scale_fill_manual(
@@ -458,19 +466,22 @@ correct_class_phenotype_pred_gg <- (
458466 )
459467 + theme_bw()
460468 + phenotypic_ggplot_theme
461- + theme(axis.text.x = element_text(size = 6.5 ))
462- + labs(x = " Mitocheck phenotype categories" , y = " Cell proportions" )
469+ + theme(
470+ axis.text.x = element_text(size = 7.5 ),
471+ strip.text = element_text(size = 11 )
472+ )
473+ + labs(x = " Phenotype categories" , y = " Cell proportions" )
463474)
464475
465476correct_class_phenotype_pred_gg
466477
467478right_bottom_nested <- (
468479 correct_pred_proportion_gg / correct_class_phenotype_pred_gg
469- ) + plot_layout(heights = c(1 , 0.7 ))
480+ ) + plot_layout(heights = c(1 , 0.2 ))
470481
471482compiled_fig <- (
472483 per_image_category_gg | right_bottom_nested
473- ) + plot_layout(widths = c(1 , 0.72 )) + plot_annotation(tag_levels = " A" )
484+ ) + plot_layout(widths = c(1 , 0.77 )) + plot_annotation(tag_levels = " A" )
474485
475486ggsave(output_fig_loio , dpi = 500 , height = 10 , width = 15 )
476487
0 commit comments