Skip to content

Commit a8d4e14

Browse files
authored
increase size of fig 4 (#66)
1 parent 17c0174 commit a8d4e14

File tree

3 files changed

+57
-37
lines changed

3 files changed

+57
-37
lines changed

7.figures/Figure4_LOIO_analysis.ipynb

Lines changed: 37 additions & 28 deletions
Large diffs are not rendered by default.
162 KB
Loading

7.figures/nbconverted/Figure4_LOIO_analysis.r

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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\npass strict\nthreshold?\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

465476
correct_class_phenotype_pred_gg
466477

467478
right_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

471482
compiled_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

475486
ggsave(output_fig_loio, dpi = 500, height = 10, width = 15)
476487

0 commit comments

Comments
 (0)