【发布时间】:2015-11-04 14:41:58
【问题描述】:
我有创建箱线图的代码,在 R 中使用 ggplot,我想用年份和战斗标记我的异常值。
这是我创建箱线图的代码
require(ggplot2)
ggplot(seabattle, aes(x=PortugesOutcome,y=RatioPort2Dutch ),xlim="OutCome",
y="Ratio of Portuguese to Dutch/British ships") +
geom_boxplot(outlier.size=2,outlier.colour="green") +
stat_summary(fun.y="mean", geom = "point", shape=23, size =3, fill="pink") +
ggtitle("Portugese Sea Battles")
有人可以帮忙吗?我知道这是正确的,我只想标记异常值。
【问题讨论】:
-
数据
seabattle从哪里来?您能否dput数据或提供示例数据以使此示例可重现? -
你已经尝试过什么了吗?
标签: r ggplot2 boxplot direct-labels