diff 09_sequence_duplication_levels.Rmd @ 3:b9c9d1dacda6 draft

reformat code
author mingchen0919
date Fri, 09 Mar 2018 17:47:50 -0500
parents 645291efd2e7
children 94762f1cb779
line wrap: on
line diff
--- a/09_sequence_duplication_levels.Rmd	Tue Feb 27 10:39:23 2018 -0500
+++ b/09_sequence_duplication_levels.Rmd	Fri Mar 09 17:47:50 2018 -0500
@@ -11,7 +11,7 @@
 ```
 
 
-# Sequence Duplication Levels
+### Sequence Duplication Levels
 
 ```{r 'Sequence Duplication Levels', fig.width=10}
 ## reads 1
@@ -34,12 +34,15 @@
 comb_sdl = rbind(melt_sdl_1, melt_sdl_2)
 comb_sdl$trim = factor(levels = c('before', 'after'), comb_sdl$trim)
 
-p = ggplot(data = comb_sdl, aes(x = id, y = value, color = variable)) +
-  geom_line() +
+p = ggplot(data = comb_sdl) +
+  geom_line(mapping = aes(x = id, y = value, color = variable)) +
   scale_x_continuous(breaks = sdl_2$id, labels = sdl_2$Duplication_Level) +
   facet_grid(. ~ trim) +
   xlab('Sequence Duplication Level') +
   ylab('') + 
-  theme(axis.text.x = element_text(angle=45))
-ggplotly(p)
-```
\ No newline at end of file
+  scale_color_discrete(name = '') +
+  theme(axis.text.x = element_text(size = 5),
+        panel.background = element_rect(fill = NA),
+        axis.line = element_line())
+p
+```