【发布时间】:2015-08-13 10:05:15
【问题描述】:
我想知道如何更改 Tukey 的 HSD 绘图的轴,这样我就可以缩短单词以使每个比较都适合而不显得荒谬。
如果您能帮助我更改轴标签、字体大小和颜色的代码,那将很有帮助。
情节中有很多比较,所以我想通过改变颜色来使重要的(间隔不在“0”线上的比较)更加突出。
`Gastropods = read.csv(file = "MaroubraZones.csv", header = TRUE)
boxplot(Abundance ~ Zone*Species,data = Gastropods, names = c("A.high", "A.mid", "A.low", "C.high", "C.mid", "C.low", "N.high", "N.mid", "N.low"))
Gastropods.ANOVA = aov(Abundance ~ Zone * Species, data = Gastropods)
hist(Gastropods.ANOVA$residuals)
plot(Gastropods.ANOVA)
Gastropods$LOGAbundance = log10(Gastropods$Abundance + 1)
Gastropods$SQRTAbundance = sqrt(Gastropods$Abundance + 1)
summary(Gastropods.ANOVA)
summary(Gastropods$SQRTAbundance.ANOVA)
interaction.plot(Gastropods$Zone, Gastropods$Species, Gastropods$Abundance, main= "Gastropod Interaction Plot", xlab = "Gastropod Zone", ylab= "Mean of Gastropod Abundance",legend = FALSE))
interaction.plot(Gastropods$Zone, Gastropods$Species, Gastropods$Abundance, main= "Gastropod Interaction Plot", xlab = "Gastropod Zone", ylab= "Mean of Gastropod Abundance", legend = FALSE)
TukeyHSD(Gastropods.ANOVA)
tuk<-TukeyHSD(Gastropods.ANOVA)
plot(tuk)`
如您所见,坐标轴很糟糕,我想突出显示零区间之外的重要值。
【问题讨论】:
-
你能贴一个你想要的图片的链接吗?
-
提供你已经尝试过/得到的东西可能是个好主意。将您的问题拆分为多个问题也可能会有所帮助,每个问题针对您当前面临的每个任务/问题。
-
欢迎来到 SO!请务必提供一个工作示例(请参阅 stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example ),以便我们确切知道您要做什么。如果您可以将图像上传到某处并发布链接,那么具有足够权限的人可以将其包含在您的问题中。
-
人们将继续投反对票,直到您提供代码、数据的最小示例并向我们展示(或解释)您正在尝试做的事情。餐巾图在这里完全可以接受。
-
我在编辑您的帖子后对其进行了投票,以便您获得更多的观众。我第一次来这里时像你一样写了帖子,然后我意识到这个想法是为了提出一个更简洁、更少个人问题的问题。这是因为 SO 不像一个讨论论坛(至少不是 SO 的 部分),而更像是一个快速参考资源,供人们在编码过程中遇到问题。他们为理解您的问题及其解决方案而阅读的内容越少越好。干杯!