Mercurial > repos > moheydarian > ggplot_histogram
diff ggplotscripthistogram.R @ 5:097e19ec0150 draft
Uploaded
| author | moheydarian |
|---|---|
| date | Sun, 12 Mar 2017 19:28:08 -0400 |
| parents | 72abdc872e49 |
| children | 90be6d1315a4 |
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)
