You can do this with the base plotting or with ggplot2
.
Some sample data:
var <- sample(1:50,size=10000,replace=T)
dataset <- as.data.frame(var)
With the base plotting you could for example use:
hist(dataset, xlab="Depth", ylab="Number of individuals", breaks=10)
However, this doesn't solve your problem. With ggplot2
you much more control about the appearance of your plot. Two examples:
ggplot(data=dataset, aes(x=var)) +
geom_histogram(fill = "white", color = "black", binwidth = 10) +
scale_x_continuous("Depth", limits=c(0,60), breaks=c(0,10,20,30,40,50,60)) +
scale_y_continuous("Number of individuals", limits=c(0,2100), breaks=c(0,400,800,1200,1600,2000)) +
theme_bw()
which gives:

ggplot(data=dataset, aes(x=var)) +
geom_histogram(fill = "white", color = "black", binwidth = 5) +
scale_x_continuous("Depth", limits=c(0,60), breaks=c(0,10,20,30,40,50,60)) +
scale_y_continuous("Number of individuals", limits=c(0,1100), breaks=c(0,250,500,750,1000)) +
theme_bw()
which gives:

With the binwidth
parameter you can choose how much detail you want.