Advertisement
matheus__serpa

eqwrwqerqwe

Apr 23rd, 2020
1,228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.76 KB | None | 0 0
  1. #+begin_src R :results output :session *R* :exports both
  2. k <- df
  3.  
  4. for(fmetric in unique(k$metric)){
  5.     folder <- "./papi-core/"
  6.     file <- paste(fmetric, "pdf", sep=".")
  7.     dir.create(folder, showWarnings = FALSE)
  8.    
  9.     dk <- k %>% filter(metric == fmetric)
  10.  
  11.     ggplot(data=dk, aes(x=as.factor(app2), y = mean, ymin = mean - se, ymax = mean + se, fill = mapping)) +
  12.         geom_bar(stat = 'identity', position = 'dodge', col = 'transparent') +
  13.         geom_errorbar(width=0.5, size=0.5, position=position_dodge(width=0.9)) +
  14.         theme_bw() +
  15.         facet_wrap(.~app1, ncol=1, scales="free_y") +
  16.         labs(x = "Application B", y = dk[1,]$metric_name, fill="Mapping")
  17.  
  18.     ggsave(file, path=folder, width=210, height=297, unit="mm")
  19.  
  20. }
  21.  
  22. #+end_src
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement