I want to show a variety of datapoints in a graph. For example I have several datapoints, each one representing the age of a user. What would be a good graph representing "10 users are 18 years old, 2 are 19 years, 1 is 20 years, 8 are 22 years...etc."?

The problem is, that the set of datapoints I want to represent may vary widely. For example I could need to represent just 5 datapoints with hugely varying numbers (= ages) or several hundred data points all between 20 and 30. So the intervall and the design of the graph needs to adapt to the datapoints I have.

I would love to hear some suggestions of people who ran into the same issue.


I would like to use a graph that shows the absolute number of responses for each numerical value ("8 are 22 years old") instead of the percentage ("24 % are 22 years old"). I think this might make the graph harder to understand, but shows significant more information, because the number of responses may vary widely and is a huge part of the information I like to deliver.

  • if possible, have the age ranges definable and dynamically represent the graph as and when age ranges are changed
    – rags
    Commented Apr 12, 2013 at 11:12
  • 1
    What will this be used for? If you're trying to present a report with a breakdown of your users' ages, then having a normally-scaled graphic with a hundred 20-year olds and one 50-year-old will give an accurate representation, but if you plan to present the graph to the users such a representation would make the 50-year-old feel insignificant, and it could be better to adjust the relative representations of parts of the graph. Please provide more context about how the graph will be used. Commented Apr 12, 2013 at 13:25
  • @3nafish My company offers a mobile survey solution. So our customers create surveys on our webapp and can see the results on our webapp. So were thinking about supporting a new type of survey question "numerical data" for things like age, distance, time, etc. The results of a survey may vary widely. But I still want to create a reusable graph that all our customers can use to analyze their survey results. Commented Apr 12, 2013 at 17:46

3 Answers 3


There are so many good examples:

enter image description here


Age diagram might help. Please also see:


Example with absolute values (source) enter image description here

  • So far I like the classical Age diagram which includes the gender the most. Because most people already know it. The problem with all of your other examples is, that they show relative values in percentage, rather then absolute values. Commented Apr 12, 2013 at 17:51

The first thing I can think of would be a bar chart, so I'm going to look at your options there.

You don't need either axis to start at 0, but you do need steps along either axis to be the same:

  • In your example you can't omit the 21y data point even though there are 0 cases.
  • But you could have the axis range from 20 to 30.

If there are many points between 20 and 30 (say for each month) you can scale the width of each bar to make it fit. Or you can combine bars if that makes sense for your data (eg. four bars for months 1-3, 4-6, 7-9, 10-12)

If you have large gaps on your axis you can skip a section:

a barchart that skips a section

  • I like the your idea of using gaps and your intution that you don't necessarily have to start at 0. But I am still not sure, if this would be the right solution. My upvote anyhow. Commented Apr 12, 2013 at 17:53
  • Do you know any chart library that lets you add this gaps? I am using Higcharts to create graphs and apparently they do not have such a feature. Commented Apr 15, 2013 at 16:27
  • I'm only somewhat familiar with Google Charts, but that doesn't do this it seems. Commented Apr 15, 2013 at 16:40

Consider using a clustered data plot.

If you want algorithmic strategies for accomplishing this, best to head over to StackOverflow.com

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.