changeset 5:097e19ec0150 draft

Uploaded
author moheydarian
date Sun, 12 Mar 2017 19:28:08 -0400
parents 25c690797274
children dafa19165908
files ggplotscripthistogram.R
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ggplotscripthistogram.R	Sun Mar 12 19:27:48 2017 -0400
+++ b/ggplotscripthistogram.R	Sun Mar 12 19:28:08 2017 -0400
@@ -36,6 +36,7 @@
   'houtputdim', 'd', 2, 'integer',
   'dim', 'k', 2, 'character',
   'scaling', 'j', 2, 'character',
+  'legend', 'l', 2, 'character',
   'output', 'o', 2, 'character'
   ), byrow=TRUE, ncol=4);
 
@@ -57,6 +58,7 @@
 integrated <- read.csv(options$input,sep='\t',header=TRUE)
 input <- melt(integrated)
 
+gg_legend = show.legend=options$legend
 
 #Choose between automatically scaled x and y axis or user defined
 if(options$scaling == "Automatic"){
@@ -107,7 +109,7 @@
 
 ggplot(input,aes(value,color=variable)) +
 geom_freqpoly(binwidth=options$binwidth,size=options$size)+gg_facet+gg_colorscale+
-gg_scalex+gg_scaley+theme_bw()+xlab(options$xlab)+ylab(options$ylab)+
+gg_scalex+gg_scaley+theme_bw()+xlab(options$xlab)+ylab(options$ylab)+gg_legend+
 ggtitle(options$title)
 
 ggsave(file=options$output)