Guest User

Untitled

a guest
Nov 22nd, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. ggplot(test, aes(x = group.long, y = est, ymin = low, ymax = high, alpha = factor(alpha))) +
  2. geom_hline(yintercept = 1, color = "grey45", linetype = 2) +
  3. geom_hline(yintercept = 0, color = "black") +
  4. geom_text(aes(y = yev, label = ev, alpha = factor(alpha)), size = 3) +
  5. geom_pointrange(shape = 18) + coord_flip() + facet_grid(~ type) +
  6. scale_y_log10(limits = c(1e-3, max(test$high)), breaks = c(0.01, 1, 10), labels = c(0.01, 1, 10)) +
  7. scale_x_discrete(labels = group.labs) +
  8. theme(legend.position = "bottom") +
  9. ylab("Adjusted hazard ratio versus matched general population") +
  10. xlab("") + scale_alpha_manual("", values = c(0, 1)) + guides(alpha = FALSE) + theme_bw() +
  11. theme(panel.grid.major.y = element_line(size = ifelse(rev(myface) == "bold", 3, 0)),
  12. axis.text.y = element_text(face = rev(myface)), strip.text = element_text(size = 8))
Add Comment
Please, Sign In to add comment