Guest User

Untitled

a guest
Jan 16th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. theme_Publication <- function(base_size=14, base_family="helvetica") {
  2. library(grid)
  3. library(ggthemes)
  4. (theme_foundation(base_size=base_size, base_family=base_family)
  5. + theme(plot.title = element_text(face = "bold",
  6. size = rel(1.2), hjust = 0.5),
  7. text = element_text(),
  8. panel.background = element_rect(colour = NA),
  9. plot.background = element_rect(colour = NA),
  10. panel.border = element_rect(colour = NA),
  11. axis.title = element_text(face = "bold",size = rel(1)),
  12. axis.title.y = element_text(angle=90,vjust =2),
  13. axis.title.x = element_text(vjust = -0.2),
  14. axis.text = element_text(),
  15. axis.line = element_line(colour="black"),
  16. axis.ticks = element_line(),
  17. panel.grid.major = element_line(colour="#f0f0f0"),
  18. panel.grid.minor = element_blank(),
  19. legend.key = element_rect(colour = NA),
  20. legend.position = "bottom",
  21. legend.direction = "horizontal",
  22. legend.key.size= unit(0.2, "cm"),
  23. legend.margin = unit(0, "cm"),
  24. legend.title = element_text(face="italic"),
  25. plot.margin=unit(c(10,5,5,5),"mm"),
  26. strip.background=element_rect(colour="#f0f0f0",fill="#f0f0f0"),
  27. strip.text = element_text(face="bold")
  28. ))
  29.  
  30. }
  31.  
  32. scale_fill_Publication <- function(...){
  33. library(scales)
  34. discrete_scale("fill","Publication",manual_pal(values = c("#386cb0","#fdb462","#7fc97f","#ef3b2c","#662506","#a6cee3","#fb9a99","#984ea3","#ffff33")), ...)
  35.  
  36. }
  37.  
  38. scale_colour_Publication <- function(...){
  39. library(scales)
  40. discrete_scale("colour","Publication",manual_pal(values = c("#386cb0","#fdb462","#7fc97f","#ef3b2c","#662506","#a6cee3","#fb9a99","#984ea3","#ffff33")), ...)
  41.  
  42. }
Add Comment
Please, Sign In to add comment