Advertisement
Guest User

Untitled

a guest
Sep 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 4.64 KB | None | 0 0
  1. en <- ggplot(data=en_pivot, aes(x=iteration, y=score, group=algorithm, colour=algorithm)) +
  2.   geom_line(size=0.8, aes(color=algorithm)) +
  3.   geom_point(size=0.8, color="black") +
  4.   theme_classic() +
  5.   theme(legend.position="right") +
  6.   scale_color_manual(values=c("grey", "black", "royalblue2", "springgreen4")) +
  7.   labs(x = "Iteration step",
  8.        y = "BDI Accuracy",
  9.        color = "Algorithm",
  10.        title = "English") +
  11.   ylim(68, 75) +
  12.   theme(plot.title = element_text(hjust = 0.5))
  13.  
  14. ################################################################################################
  15.  
  16. es_pivot <- subset(d, pivot=="es",
  17.                   select = c(score,iteration,algorithm))
  18.  
  19. es_pivot$iteration <- factor(es_pivot$iteration,
  20.                              levels = c("base", "de", "fr", "it", "pt", "en", "es"))
  21.  
  22. es <- ggplot(data=es_pivot, aes(x=iteration, y=score, group=algorithm, colour=algorithm)) +
  23.   geom_line(size=0.8, aes(color=algorithm)) +
  24.   geom_point(size=0.8, color="black") +
  25.   theme_classic() +
  26.   theme(legend.position="right") +
  27.   scale_color_manual(values=c("grey", "black", "royalblue2", "springgreen4")) +
  28.   labs(x = "Iteration step",
  29.        y = "BDI Accuracy",
  30.        color = "Algorithm",
  31.        title = "Spanish") +
  32.   ylim(68, 75) +
  33.   theme(plot.title = element_text(hjust = 0.5))
  34.  
  35. ################################################################################################
  36.  
  37. de_pivot <- subset(d, pivot=="de",
  38.                    select = c(score,iteration,algorithm))
  39.  
  40. de_pivot$iteration <- factor(de_pivot$iteration,
  41.                              levels = c("base", "fr", "it", "pt", "en", "es", "de"))
  42.  
  43. de <- ggplot(data=de_pivot, aes(x=iteration, y=score, group=algorithm, colour=algorithm)) +
  44.   geom_line(size=0.8, aes(color=algorithm)) +
  45.   geom_point(size=0.8, color="black") +
  46.   theme_classic() +
  47.   theme(legend.position="right") +
  48.   scale_color_manual(values=c("grey", "black", "royalblue2", "springgreen4")) +
  49.   labs(x = "Iteration step",
  50.        y = "BDI Accuracy",
  51.        color = "Algorithm",
  52.        title = "German") +
  53.   ylim(68, 75) +
  54.   theme(plot.title = element_text(hjust = 0.5))
  55.  
  56. ################################################################################################
  57.  
  58. fr_pivot <- subset(d, pivot=="fr",
  59.                    select = c(score,iteration,algorithm))
  60.  
  61. fr_pivot$iteration <- factor(fr_pivot$iteration,
  62.                              levels = c("base", "it", "pt", "en", "es", "de", "fr"))
  63.  
  64. fr <- ggplot(data=fr_pivot, aes(x=iteration, y=score, group=algorithm, colour=algorithm)) +
  65.   geom_line(size=0.8, aes(color=algorithm)) +
  66.   geom_point(size=0.8, color="black") +
  67.   theme_classic() +
  68.   theme(legend.position="right") +
  69.   scale_color_manual(values=c("grey", "black", "royalblue2", "springgreen4")) +
  70.   labs(x = "Iteration step",
  71.        y = "BDI Accuracy",
  72.        color = "Algorithm",
  73.        title = "French") +
  74.   ylim(68, 75) +
  75.   theme(plot.title = element_text(hjust = 0.5))
  76.  
  77.  
  78. ################################################################################################
  79.  
  80. it_pivot <- subset(d, pivot=="it",
  81.                    select = c(score,iteration,algorithm))
  82.  
  83. it_pivot$iteration <- factor(it_pivot$iteration,
  84.                              levels = c("base", "pt", "en", "es", "de", "fr", "it"))
  85.  
  86. it <- ggplot(data=it_pivot, aes(x=iteration, y=score, group=algorithm, colour=algorithm)) +
  87.   geom_line(size=0.8, aes(color=algorithm)) +
  88.   geom_point(size=0.8, color="black") +
  89.   theme_classic() +
  90.   theme(legend.position="right") +
  91.   scale_color_manual(values=c("grey", "black", "royalblue2", "springgreen4")) +
  92.   labs(x = "Iteration step",
  93.        y = "BDI Accuracy",
  94.        color = "Algorithm",
  95.        title = "Italian") +
  96.   ylim(68, 75) +
  97.   theme(plot.title = element_text(hjust = 0.5))
  98.  
  99. ################################################################################################
  100.  
  101. pt_pivot <- subset(d, pivot=="pt",
  102.                    select = c(score,iteration,algorithm))
  103.  
  104. pt_pivot$iteration <- factor(pt_pivot$iteration,
  105.                              levels = c("base", "en", "es", "de", "fr", "it", "pt"))
  106.  
  107. pt <- ggplot(data=pt_pivot, aes(x=iteration, y=score, group=algorithm, colour=algorithm)) +
  108.   geom_line(size=0.8, aes(color=algorithm)) +
  109.   geom_point(size=0.8, color="black") +
  110.   theme_classic() +
  111.   theme(legend.position="right") +
  112.   scale_color_manual(values=c("grey", "black", "royalblue2", "springgreen4")) +
  113.   labs(x = "Iteration step",
  114.        y = "BDI Accuracy",
  115.        color = "Algorithm",
  116.        title = "Portuguese") +
  117.   ylim(68, 75) +
  118.   theme(plot.title = element_text(hjust = 0.5))
  119.  
  120.  
  121. grid.arrange(en, es, de, fr, it, pt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement