ggplot2 中的 3 x 2 绘图
我有一个包含以下变量的数据集:
condition: 1,2,3
type: friend, foe
Proportion_Choosing_Message: represents the number of participants choosing a particular response
Optimal: the optimal probability of choosing each case
我想创建一个 3 x 2 图,其中两列代表类型,行代表条件。
所以我想有单独的图:
type:friend & condition 1, type:friend&condition2, type:friend&condition3
type:foe & condition1, type:foe&condition2, type:foe&condition3
要绘制的值是 Proportion_Choosing_Message 和 Optimal
I have a dataset with the following variables:
condition: 1,2,3
type: friend, foe
Proportion_Choosing_Message: represents the number of participants choosing a particular response
Optimal: the optimal probability of choosing each case
I would like create a 3 by 2 plot, where the two columns represents type and the rows represent condition.
SO I would like to have separate plots for:
type:friend & condition 1, type:friend&condition2, type:friend&condition3
type:foe & condition1, type:foe&condition2, type:foe&condition3
The values to be plotted are Proportion_Choosing_Message and Optimal
Here's the dataset: http://dl.dropbox.com/u/22681355/ggplot.csv
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看过 Hadley 的 网站 上的文档和示例吗?您读过他的书的前几章吗?我之所以这么问,是因为这是一个非常基本的问题,即使通过文档进行最少的努力也可以轻松回答。
这是您的示例的一些代码,但将来,我建议您在向 SO 寻求帮助之前进行更多研究。
Have looked at the documentation and example on Hadley's site? Have you read through the first few chapters of his book? I ask, because this is a very basic question that is easily answered from even a minimal amount of effort with the documentation.
Here's some code for your example, but in the future, I suggest you do more research before turning to SO for help.