changeset 17:7c792cf4a5cf draft default tip

planemo upload commit ac620fd79bab10b47e40703401a02d7292321258-dirty
author mingchen0919
date Thu, 29 Nov 2018 20:47:54 -0500
parents 8ae4b7a00bf7
children
files rmarkdown_report.Rmd
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rmarkdown_report.Rmd	Thu Nov 29 20:21:48 2018 -0500
+++ b/rmarkdown_report.Rmd	Thu Nov 29 20:47:54 2018 -0500
@@ -93,11 +93,13 @@
 library(plotly)
 library(ggplot2)
 len_dist$count = as.numeric(len_dist$count)
-pp = ggplot(data = len_dist, aes(1:nrow(len_dist), count)) +
+labels = as.character(len_dist$length)
+len_dist$length = 1:nrow(len_dist)
+pp = ggplot(data = len_dist, aes(length, count)) +
   geom_line(color='red') +
   scale_x_continuous(name = 'Length',
                    breaks = 1:nrow(len_dist),
-                   labels = as.character(len_dist$length)) +
+                   labels = labels) +
   theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
   ylab('Count') +
   ggtitle('Length distribution')