万事如意,
我需要帮助来找到在箱线图中标记散点图的解决方案。
如下图所示,有两个数据,第一个是所有大宇宙的数据,第二个是每个大宇宙的平均值。
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
表示
1 15.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)?
这是我制作的图表:如下所示,有两个图表,右侧是所有宏观宇宙平均值的箱线图,左侧是所有宏观宇宙平均值散点图的箱线图。
之前谢谢你的帮助。。
问候,
尤吉兹