Data Visualization – Understanding the Difference Between Histograms and Bar Graphs

barplotdata visualizationdistributionshistogram

I have data for number of patients used to collect the data in a hospital for each day. I want to display them as a graphical representation of number of patients used to collect the data for each week. Which graph is more suitable for this? Histogram or Bar Graph? Please explain the pros and cons of each of them. Also if you find any graph better than them, please tell me and also justify it.

Best Answer

You should use bar chart. Histograms are used for continuous variables. You want to show the number of patients per week. Week is a discrete variable, hence you would use a bar chart. Your x variable would be the week number: week1, week2, and so on. Your y variable will be the number of patients for that week.

Which graph is better depends on what you want to convey in your visualization, assuming the graph is suitable for the type of the variable. For example, let's say you want to convey the number of patients last 3 weeks. In this case, you can use a line chart or a bar chart. If you want to convey a trend, then perhaps a line chart would be better.

For more info on histogram: https://en.wikipedia.org/wiki/Histogram