William W. answered 09/23/19
Math and science made easy - learn from a retired engineer
You are going to want to have equal units along the horizontal axis (bottom of the graph). If you don't, you would be distorting the data. So, considering that the horizontal axis is age 18 - 24, your choices are limited to ONLY doing each age separately. Since there are 7 numbers, you can't divide that into even increments that are smaller than 1 age each. Example: 18-19, 20-21, 22-23 leaves 24 by itself and that would distort the data. Additionally, it leaves only 4 classes (groups) and that's starting to get pretty small. If you group by 3's, you get 18-20, 21-23 and that still leaves 24 by itself plus you only have 3 classes. No good.
It is possible to add one to either end of the data and do, for example, 17-18, 19-20, 21-22, 23-24 and get 5 classes but that seems flaky to me because you know that there is no data for age 17 and so it seems as though you are trying to be fictitious about how you are portraying the data.
Some people say to shoot for 10 classes of data along the horizontal axis. I think 10 is starting to get pretty "busy". But it's a good rule of thumb. It's fairly typical for me to shoot for 5 - 10 classes. The main thing you want to do is portray to the reader the important attributes of the data. So take a look at the results when you group data and see if how you divided it portrays something meaningful or not. Try different numbers in the classes to see if it portrays things better.