r - Modifying a Tukey HSD 95% family-wise CL plot in Rstudio -


i wanted know how change axis of plot of tukey's hsd shorten words make each comparison fit , not ridiculous.

it lot if me codes changing axis labels, font size , color.

there quite few comparisons in plot, make significant ones (the comparisons intervals not on "0" line) stand out more changing color.

`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)` 

as can see axis's terrible , want highlight significant values outside of 0 interval.

enter image description here

try this:

tukeyhsd(gastropods.anova) tuk<-tukeyhsd(gastropods.anova) psig=as.numeric(apply(tuk$`zone:species`[,2:3],1,prod)>=0)+1 op=par(mar=c(4.2,9,3.8,2)) plot(tuk,col=psig,yaxt="n") (j in 1:length(psig)){ axis(2,at=j,labels=rownames(tuk$`zone:species`)[length(psig)-j+1],      las=1,cex.axis=.8,col.axis=psig[length(psig)-j+1]) } par(op) 

you have similar plot enter image description here


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -