Mercurial > repos > moheydarian > ggplot_histogram
comparison ggplotscripthistogram.R @ 23:eeff8405f1ac draft
Uploaded
| author | moheydarian |
|---|---|
| date | Tue, 11 Apr 2017 18:17:16 -0400 |
| parents | b212836e738d |
| children | b9118a9b5109 |
comparison
equal
deleted
inserted
replaced
| 22:91a3a6189b35 | 23:eeff8405f1ac |
|---|---|
| 71 gg_density = ggplot(input,aes(value ,color=variable)) | 71 gg_density = ggplot(input,aes(value ,color=variable)) |
| 72 gg_freq = NULL | 72 gg_freq = NULL |
| 73 } else if(options$density == "ndensity"){ | 73 } else if(options$density == "ndensity"){ |
| 74 gg_density = ggplot(input,aes(value, ..ncount..,color=variable)) | 74 gg_density = ggplot(input,aes(value, ..ncount..,color=variable)) |
| 75 gg_freq = NULL | 75 gg_freq = NULL |
| 76 } else if(options$density == "density"){ | 76 } else if(options$density == "freq"){ |
| 77 gg_density = ggplot(input,aes(value,color=variable)) | 77 gg_density = ggplot(input,aes(value,color=variable)) |
| 78 gg_freq = aes(y=..count../sum(..count..)) | 78 gg_freq = aes(y=..count../sum(..count..)) |
| 79 } | 79 } |
| 80 | 80 |
| 81 #Choose between automatically scaled x and y axis or user defined | 81 #Choose between automatically scaled x and y axis or user defined |
