Description Usage Arguments Examples
Display a 1d distribution by dividing into bins and counting the number of observations in each bin. Histograms use bars.
stat_bin
is suitable only for continuous x data. If your x data is
discrete, you probably want to use stat_count
.
1 2 3 4 |
mapping |
Set of aesthetic mapping created by aes or aes_. |
data |
The data to be displayed in this layer. |
stat |
Use override the default connection between geom_histogram, geom_freqpoly and stat_bin |
binwidth |
??? |
bins |
Does not use in ggplot2.SparkR |
origin |
Does not use in ggplot2.SparkR |
right |
Does not use in ggplot2.SparkR |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
na.rm |
Not used in ggplot2.SparkR |
show.legend |
logical. Should this layer be included in the legends? |
inherit.aes |
If FALSE, overrides the default aesthetics, rather ehan combining with them. |
... |
other arguments passed on to layer. |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
ggplot(faithful, aes(eruptions)) + geom_histogram()
df <- createDataFrame(sqlContext, faithful)
ggplot(df, aes(eruptions)) + geom_histogram()
ggplot(df, aes(eruptions)) + geom_histogram(binwidth = 5)
ggplot(df, aes(eruptions, fill = waiting)) + geom_histogram()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.