Mercurial > repos > moheydarian > ggplot_histogram
changeset 16:9577cd390ee6 draft
Uploaded
| author | moheydarian |
|---|---|
| date | Tue, 11 Apr 2017 16:51:37 -0400 |
| parents | 19546f3ef70a |
| children | 064d7ad9968d |
| files | ggplotscripthistogram.R |
| diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ggplotscripthistogram.R Tue Apr 11 16:43:46 2017 -0400 +++ b/ggplotscripthistogram.R Tue Apr 11 16:51:37 2017 -0400 @@ -68,9 +68,11 @@ #density if(options$density == "counts"){ - gg_density = NULL + gg_density = ggplot(input,aes(value ,color=variable)) + } else { - gg_density = , ...density..., + gg_density = ggplot(input,aes(value, ...density...,color=variable)) + } #Choose between automatically scaled x and y axis or user defined @@ -120,7 +122,7 @@ gg_colorscale = scale_color_brewer(palette=options$colors, direction=options$colororder) } -ggplot(input,aes(value gg_density,color=variable)) + +gg_density + 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_legend+ ggtitle(options$title)
