豆情节和传说我有一个关于我的豆情节和传说中的问题。我无法找到一个方法来做到以下几点调整中的R
- 改变X轴标签(从
communication_focused
到communication-focused
) - 显示更精细的方式y轴(如减免应该是从0开始,25 ,50,75,100,125 ... 300)
- 把传说中的情节
- 保持在传说中比我得到现在
- 标志着在每个类别中的
mean
(黑色实线越大文本的字体以外)在“红”色的每个类别
这里是我的代码:
beanplot(onset_s~ group*meaning, data=mu3,ll = 0.08,
main = "Distribution of movement units", side = "both",
col = list("black", c("grey", "white")),
axes=T, beanlines = "median")
legend("topleft",fill = c("grey", "black"), legend = c("Non-Performers", "Experts"), cex=0.65)
我的数据集:
tier meaning onset_sgroup
head_face_mu self_focused 0 expert
head_face_mu self_focused 0 expert
head_face_mu context_focused 0 expert
upper_body_mu self_focused 0 expert
upper_body_mu self_focused 0 expert
head_face_mu communication_focused 0 novice
head_face_mu context_focused 0 novice
head_face_mu context_focused 0 novice
upper_body_mu self_focused 0 novice
upper_body_mu self_focused 0 novice
upper_body_mu self_focused 0 novice
head_face_mu self_focused 0.18 novice
lower_body_mu self_focused 0.667 novice
head_face_mu communication_focused 0.69 novice
head_face_mu context_focused 1.139 novice
head_face_mu context_focused 1.301 novice
head_face_mu context_focused 1.32 novice
lower_body_mu self_focused 1.66 novice
head_face_mu context_focused 1.98 novice
lower_body_mu self_focused 2.205 novice
head_face_mu communication_focused 2.297 novice
head_face_mu context_focused 2.349 novice
lower_body_mu self_focused 2.417 novice
upper_body_mu self_focused 2.666 novice
head_face_mu self_focused 2.675 expert
head_face_mu context_focused 3.218 novice
head_face_mu context_focused 3.353 novice
head_face_mu context_focused 3.436 expert
head_face_mu context_focused 3.588 novice
head_face_mu context_focused 3.697 novice
upper_body_mu self_focused 4.006 novice
upper_body_mu context_focused 4.033 novice
upper_body_mu self_focused 4.06 expert
head_face_mu context_focused 4.33 novice
upper_body_mu self_focused 4.332 novice
upper_body_mu self_focused 4.44 novice
head_face_mu context_focused 4.738 novice
lower_body_mu self_focused 5.395 novice
head_face_mu self_focused 5.428 novice
lower_body_mu self_focused 5.926 novice
head_face_mu context_focused 6.283 novice
head_face_mu context_focused 7.002 novice
head_face_mu self_focused 7.031 novice
lower_body_mu self_focused 7.189 novice
upper_body_mu communication_focused 7.45 novice
lower_body_mu self_focused 7.632 expert 1.144
head_face_mu self_focused 7.739 expert 2.159
lower_body_mu self_focused 8.943 novice 9.517
head_face_mu context_focused 9.002 expert 4.608
这是我的图:
任何的反馈和评论都超过欢迎!
预先感谢您。
首先,当您添加数据集时可以使用'dput()'完成这项工作。其次,你应该考虑在'ggplot2'包使用'geom_violin'因为这将解决你的传奇问题。第三,为了按类别分割你的情节,你可以在这个问题[拆分小提琴情节]中看到答案(http://stackoverflow.com/questions/35717353/split-violin-plot-with-ggplot2)。最后,您可以使用'geom_line'来添加您的平均值并将其颜色设置为红色。 – tbradley
@tbradley:第1点:我将自己的数据子集的50分。如果有一个选项可以将整个“.csv”文件添加到我的问题中(我的子集包含将近1000个数据点),并且您希望我这样做,请让我知道。第二和第三点。'geom_violin'情节对我来说不是一种选择,因为a)你不能看到它的个别异常值,b。)只有最小值和最大值在图上可见,以及c。)没有指示在图形表示中可以观察到一个组。 – user3832272