would like to plot the following data on the same barplot. it is a length frequency barplot showing the males and the females of a population with respect to their length classes:
I am new to this and i dont know how to put my data here, but here is an example:
Lengthclass Both Males Females
60 7 5 2
70 10 5 5
80 11 6 5
90 4 2 2
100 3 3 0
110 3 0 3
120 1 1 0
130 0 0 0
140 1 0 1
150 2 0 2
If i use this code:
{barplot()} it does not give me all three variables on the same plot.
i need a graph the looks like this but on R.

Thank you:)

dput(yourdata)(ordput(head(yourdata))if you have a lot of data) to build a reproducible example, and indicate exactly whatbarplot()command you used. That makes it easier for all of us to help you. - Stephan Kolassa