小组在ggplot2的AES参数中做了什么 [英] What does group do in the aes parameter of ggplot2
本文介绍了小组在ggplot2的AES参数中做了什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以帮忙解释一下ggplot2中的group参数吗?我正在看一行代码,如下所示:
Can someone please help explain what the group parameter does in ggplot2? I'm looking at a line of code that looks as follows:
ggplot(summarized.current.data, aes(x = GROUP_ID, y= Endpoint.Value, color = GROUP_ID, group = GROUP_ID))
在图表的底部,我正确地获得了group_id,在y轴上,我获得了端点值.它可以按组正确给它们上色.但是"group = GROUP_ID"的作用是什么?图表确实有所不同,但我不知道怎么做.
On the bottom of my chart I correctly get group_id, on the y-axis I get the endpoint value. It correctly colors them by group. But what does the "group = GROUP_ID" do? The charts do come out different but I can't quite figure out how.
推荐答案
您可以使用
?aes_group_order
?aes_group_order
简而言之,组可以按因子水平绘制多条线
in short,group can draw many lines group by the factor levels
这篇关于小组在ggplot2的AES参数中做了什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文