There are two types of bar charts: geom_bar() and geom_col(). geom_bar() makes the height of the bar proportional to the number of cases in each group (or if the weight aesthetic is supplied, the sum of the weights). If you want the heights of the bars to represent values in the data, use geom_col() instead.
从ggplot2 docs开始:
听起来它们之间的区别不在于标记,而在于标记所代表的价值。在Altair中,由标记表示的值是通过编码定义的
所以牵牛星版本的
geom_bar()
可能看起来像这样:或者,对于具有重量美学的
geom_bar()
牵牛星版本的
geom_col()
可能看起来像这样:相关问题 更多 >
编程相关推荐