I have some data for various experimental treatments that are negative. I would like to build the x axis on top of the tablet and overlay the labels just as if it were a traditional bar chart in the center of the bars.
I checked everything and can’t find anything that allows me to name axis labels with words, setting only labels and numbers.
Here's the data: - "wp_means"
> 12 15 3 6 9 Control
-0.3000000 -0.2416667 -0.3416667 -0.3916667 -0.2750000 -0.2750000
DL
-0.2833333
Here is my code to build the bar. I can omit the x axis from its usual position, but I cannot seem to have it on top with its labels, etc., where I want it to be.
cols<-c("blue1", "cyan","chartreuse","mediumspringgreen","maroon1","orange","red")
wp<-data.frame(a=c(wp_means),b=c(12,15,3,6,9,"Control","DL"))
wp$c=factor(wp$b, levels = c("Control",15,"DL",12,9,6,3))
wp <- wp[order(wp$c), ]
barplot(height=wp$a,names.arg=wp$c,col=cols,main="Water Potential",las=1,xaxt="n",
ylab = "Water potential
(MPA)",pch=21,bg="black",cex=0.7,cex.lab=0.8,font.lab=2,
cex.axis=0.7,font.axis=2,cex.main=1,ylim=c(-0.5,0),xaxt="n")
: x , "levels = c("Control"....)", . , , xlab="some name", .
