Skip to content

Commit

Permalink
Fix Fig_S4 and adjust filename
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMay committed May 28, 2020
1 parent cc07834 commit a35f404
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 39 deletions.
Binary file added extended_data_figs_tabs/Ex_Dat_Fig3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified extended_data_figs_tabs/Ex_Dat_Fig4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extended_data_figs_tabs/Ex_Dat_Fig8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion r_scripts/7_plot_fig_S3_z_score_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -302,5 +302,5 @@ cowplot::plot_grid(bottom) +

# set local directory to save
# plot sized for 2 columns
ggsave(paste0(path2wd, 'extended_data_figs_tabs/Ex_Dat_Fig3.tiff'),
ggsave(paste0(path2wd, 'extended_data_figs_tabs/Ex_Dat_Fig3.png'),
width = 183, height = 120, units = 'mm')
63 changes: 26 additions & 37 deletions r_scripts/7_plot_fig_S4_robustCheck.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,8 @@ Sstd_robust <- ggplot() +
geom_point(data = fixed_effects,
aes(x = Sstd_ref, y = Sstd_sens1, colour = 'sens1'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens1, colour = 'sens1'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens1, colour = 'sens1')) +
geom_linerange(data = fixed_effects,
aes(x = Sstd_ref, ymin = Sstd_sens1_lower, ymax = Sstd_sens1_upper, colour = 'sens1')) +
# reference versus case 3
Expand All @@ -251,35 +250,32 @@ Sstd_robust <- ggplot() +
geom_point(data = fixed_effects,
aes(x = Sstd_ref, y = Sstd_sens3, colour = 'sens3'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens3, colour = 'sens3'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(x = Sstd_ref, ymin = Sstd_sens3_lower, ymax = Sstd_sens3_upper, colour = 'sens3')) +
aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens3, colour = 'sens3')) +
geom_linerange(data = fixed_effects,
aes(x = Sstd_ref, ymin = Sstd_sens3_lower, ymax = Sstd_sens3_upper, colour = 'sens3')) +
# reference versus case 8
geom_point(data = study_coefs,
aes(x = Sstd_ref, y = Sstd_sens4, colour = 'sens8'),
alpha = 0.3) +
geom_point(data = fixed_effects,
aes(x = Sstd_ref, y = Sstd_sens4, colour = 'sens8'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens4, colour = 'sens8'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens4, colour = 'sens8')) +
geom_linerange(data = fixed_effects,
aes(x = Sstd_ref, ymin = Sstd_sens4_lower, ymax = Sstd_sens4_upper, colour = 'sens8')) +
# reference versus case 11
# reference versus case 11
geom_point(data = study_coefs,
aes(x = Sstd_ref, y = Sstd_sens5, colour = 'sens11'),
alpha = 0.3) +
geom_point(data = fixed_effects,
aes(x = Sstd_ref, y = Sstd_sens5, colour = 'sens11'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens5, colour = 'sens11'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(x = Sstd_ref, ymin = Sstd_sens5_lower, ymax = Sstd_sens5_upper, colour = 'sens11')) +
aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens5, colour = 'sens11')) +
geom_linerange(data = fixed_effects,
aes(x = Sstd_ref, ymin = Sstd_sens5_lower, ymax = Sstd_sens5_upper, colour = 'sens11')) +
# 1:1 line and zero lines
geom_abline(intercept = 0, slope = 1, lty = 2) +
# geom_vline(xintercept = 0, lty = 2) +
Expand Down Expand Up @@ -307,9 +303,8 @@ Nstd_robust <-
geom_point(data = fixed_effects,
aes(x = Nstd_ref, y = Nstd_sens1, colour = 'sens11'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens1, colour = 'sens1'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens1, colour = 'sens1')) +
geom_linerange(data = fixed_effects,
aes(x = Nstd_ref, ymin = Nstd_sens1_lower, ymax = Nstd_sens1_upper, colour = 'sens1')) +
# reference versus case 3
Expand All @@ -319,9 +314,8 @@ Nstd_robust <-
geom_point(data = fixed_effects,
aes(x = Nstd_ref, y = Nstd_sens3, colour = 'sens3'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens3, colour = 'sens3'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens3, colour = 'sens3')) +
geom_linerange(data = fixed_effects,
aes(x = Nstd_ref, ymin = Nstd_sens3_lower, ymax = Nstd_sens3_upper, colour = 'sens3')) +
# reference versus case 8
Expand All @@ -331,9 +325,8 @@ Nstd_robust <-
geom_point(data = fixed_effects,
aes(x = Nstd_ref, y = Nstd_sens4, colour = 'sens8'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens4, colour = 'sens8'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens4, colour = 'sens8')) +
geom_linerange(data = fixed_effects,
aes(x = Nstd_ref, ymin = Nstd_sens4_lower, ymax = Nstd_sens4_upper, colour = 'sens8')) +
# reference versus case 11
Expand All @@ -343,9 +336,8 @@ Nstd_robust <-
geom_point(data = fixed_effects,
aes(x = Nstd_ref, y = Nstd_sens5, colour = 'sens11'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens5, colour = 'sens11'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens5, colour = 'sens11')) +
geom_linerange(data = fixed_effects,
aes(x = Nstd_ref, ymin = Nstd_sens5_lower, ymax = Nstd_sens5_upper, colour = 'sens11')) +
# 1:1 line and zero lines
Expand Down Expand Up @@ -380,9 +372,8 @@ S_PIE_robust <- ggplot() +
geom_point(data = fixed_effects,
aes(x = S_PIE_ref, y = S_PIE_sens1, colour = 'sens1'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens1, colour = 'sens1'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens1, colour = 'sens1')) +
geom_linerange(data = fixed_effects,
aes(x = S_PIE_ref, ymin = S_PIE_sens1_lower, ymax = S_PIE_sens1_upper, colour = 'sens1')) +
# reference versus case 3
Expand All @@ -392,7 +383,7 @@ S_PIE_robust <- ggplot() +
geom_point(data = fixed_effects,
aes(x = S_PIE_ref, y = S_PIE_sens3, colour = 'sens3'),
size = 2) +
geom_errorbarh(data = fixed_effects,
geom_linerange(data = fixed_effects,
aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens3, colour = 'sens3'),
width = 0) +
geom_linerange(data = fixed_effects,
Expand All @@ -404,9 +395,8 @@ S_PIE_robust <- ggplot() +
geom_point(data = fixed_effects,
aes(x = S_PIE_ref, y = S_PIE_sens4, colour = 'sens8'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens4, colour = 'sens8'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens4, colour = 'sens8')) +
geom_linerange(data = fixed_effects,
aes(x = S_PIE_ref, ymin = S_PIE_sens4_lower, ymax = S_PIE_sens4_upper, colour = 'sens8')) +
# reference versus case 11
Expand All @@ -416,9 +406,8 @@ S_PIE_robust <- ggplot() +
geom_point(data = fixed_effects,
aes(x = S_PIE_ref, y = S_PIE_sens5, colour = 'sens11'),
size = 2) +
geom_errorbarh(data = fixed_effects,
aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens5, colour = 'sens11'),
width = 0) +
geom_linerange(data = fixed_effects,
aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens5, colour = 'sens11')) +
geom_linerange(data = fixed_effects,
aes(x = S_PIE_ref, ymin = S_PIE_sens5_lower, ymax = S_PIE_sens5_upper, colour = 'sens11')) +
# 1:1 line and zero lines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ ggplot() +
text = element_text(size = 7))

# 1.5 column width
ggsave(paste0(path2wd, 'extended_data_figs_tabs/Ex_Dat_Fig8.tiff'),
ggsave(paste0(path2wd, 'extended_data_figs_tabs/Ex_Dat_Fig8.png'),
width = 120, height = 120, units = 'mm')

0 comments on commit a35f404

Please sign in to comment.