Modifying X axis

#1
Hi,

I'm pretty new to R, and I have a question about plots. I've made a histogram about my data, but because i have very few data above 5, i grouped them all in '>5'.
So I want my X axis like: 0 1 2 3 4 5 >5.
Now I've got: 0 1 2 3 4 5 6 and >5 is written 'under' the 6.

This is the code that matters:

hist(totaldata$count5,xlab="title",ylab="title",breaks=seq(-0.5,6.5,by=1),main="Histogram")
mtext(">5",side=1,at=6)

Can you help me?

This is a picture of my problem:
 
#2
Hi,

I'm pretty new to R, and I have a question about plots. I've made a histogram about my data, but because i have very few data above 5, i grouped them all in '>5'.
So I want my X axis like: 0 1 2 3 4 5 >5.
Now I've got: 0 1 2 3 4 5 6 and >5 is written 'under' the 6.

This is the code that matters:

hist(totaldata$count5,xlab="title",ylab="title",breaks=seq(-0.5,6.5,by=1),main="Histogram")
mtext(">5",side=1,at=6)

Can you help me?

This is a picture of my problem:

I think something like this should work for you, i tried out this
Code:
x<-c(1,1,2,2,2,3,3,4,4,4,4,5,5,6)
hist(x,axes=FALSE)
axis(1,at=1:6,labels=c("1","2","3","4","5",">5"))
Basically you suppress the default labels and then apply your specified labels through axis statement
Attached plot