祝大家好,
我需要帮助找到在箱线图中标记散点图的解决方案。
如下图所示,有两个数据,第一个是所有宏观宇宙的数据,第二个是每个宏观宇宙的平均值。
Tab1// 查询结果
1 2 3 4 5 6
1 13.2089 13.3161 13.2497 13.2268 13.2209 11.6036
2 13.2923 13.3869 13.2950 13.2876 13.2922 11.7044
3 13.4493 13.5394 13.4450 13.4735 13.4689 11.9483
means
1 https://i.stack.imgur.com/CXGEO.jpg15.43801 15.38659 15.23252 15.50707 15.67684 15.25383
我的问题是,如何显示图二中每个点的标签。我想用它们的 no.macrocosme 来标记每个点。
这是我的小代码:
#Macrocosme
Mac = svalue(cbMacro)
#Add boxplots to all Macs
par(mfrow = c(1, 2))
boxplot(Tab1, main="Temperature of Macrocosme", xlab="No. Macrocosme", ylab="Temperature in Celcius", col=(c("gold","darkgreen")),ylim=range(c(min(vmin),max(vmax))))
points(1:length(Mac), means,pch = 22)
#Add boxplots to a median of all Macs
boxplot(means, main="Mean Temperature of all the Macrocosme", xlab="Mean", ylab="Temperature in Celcius")
with(Tab1, stripchart(means, method="jitter", vertical=TRUE, add=TRUE, col="red",pch = 20))
我尝试过使用函数 text() --> 显示箱线图中的数字而不是散点图中的数字,并且包 textxy() --> 不显示任何内容
我想当我确定 x,y 值时存在问题.. 嗯.. 我们是否有可能在图中显示每个箱线图的摘要(中位数,Q1 -Q3)?
这是我生成的图表:
如下图所示,有两张图,右侧是所有宏观均值的箱线图,左侧是所有宏观均值的散点图。
Thanks before for your help..
Regards,
Yougyz