ggplot中geom_bar和geom_histogram之间有什么区别(如果有的话)?它们似乎产生相同的图并采用相同的参数.
csg*_*pie 14
GGPLOT2
经过多一点调查后,我认为在ggplot2中geom_bar和之间没有区别geom_histogram.来自文档:
geom_histogram(mapping = NULL, data = NULL, stat = "bin",
position = "stack", ...)
geom_bar(mapping = NULL, data = NULL, stat = "bin",
position = "stack", ...)
Run Code Online (Sandbox Code Playgroud)
我意识到它在geom_histogram文档中指出:
geom_histogram是geom_bar和stat_bin的别名
但说实话,我不确定这意味着什么,因为我对ggplot2的理解是stat_bin和geom_bar都是图层(重点略有不同).