Possible Duplicate:
Create a bar graph with pre-summarized data using ggplot2
关于ggplot2引用手册 http://had.co.nz/ggplot2/geom_bar.html
我们可以看到,使用提供的菱形数据,堆叠条形图非常容易。
但是,我尝试使用的数据集与钻石数据不同,因为我的数据集已经进行了汇总。
附件是我的意思的一个最小例子
AgeGroup gender Level.of.Education status count
1 18-25 male High School married 10
2 18-25 male High School single 20
3 18-25 male College married 25
4 18-25 male College single 10
5 18-25 male PhD married 50
6 18-25 male PhD single 4
7 18-25 male GED married 20
8 18-25 male GED single 100
9 18-25 female High School married 20
10 18-25 female High School single 10
11 18-25 female College married 30
12 18-25 female College single 60
13 18-25 female PhD married 80
14 18-25 female PhD single 10
15 18-25 female GED married 5
16 18-25 female GED single 2
完整的数据集也有时间范围,所以我想制作一个堆叠条形图,显示已婚人数和未婚人数加类,使用“教育水平”作为填充条。
完整的数据集非常大,因此非常需要像这样的聚合数据。
您的意见将对我有很大帮助。谢谢。
相关文章:
jquery - 获取 "removeattr is not a function"异常
jquery - 如何使用 jQuery 和 HTML5 canvas 画线
css - 可缩放字体大小,SASS (LESS) with "px"vs plain ems
debugging - vb6 如何在 msgbox 中进入 Debug模式
jsf - 如何为 h :graphicImage Primefaces 添加操作
css - 使用 :nth-child(odd) selector on div image