5

I am using the built-in data analysis tool to create a histogram for a column of numerical data in Excel. I'm doing the same thing for many different files, and they all need to have the same scale on the X axis, despite the data being different. I want the X axis to always display exactly the same range, rather than being determined by the data.

As you can see from these examples, the two histograms don't have the same scale or range on the x axis:

Example 1

Example 2

This type of chart treats the X values as categories, so the bin values are just labels; there is no option in axis formatting that lets you to set min and max values.

How can I accomplish this?

7
  • How are you approaching this? Are you using the built-in histogram function and then charting the results? That allows you to set the limits and number of buckets. If you are trying to ignore values outside of the 10-20 range, you could sort and select the range to use (or other methods of limiting data used). If your issue is just getting a graph with an X axis that runs from 10 to 20, that can be done in axis formatting. Can you clarify what you're trying to do?
    – fixer1234
    Mar 26, 2015 at 18:11
  • @fixer1234 yes im using data analysis tool to create the histogram , and because im doing the same thing for many different files, they all need to have a scale, obviously, they cant have different ranges on the x axis , therefore I need to have a lower and upper bound on the x-axis of the histogram, in this case from e.g 9.5 to 15.5 but i dont know how to do that , there is no option in axis formatting which lets you to set min and max values on your histogram x -axis
    – A Banitaba
    Mar 26, 2015 at 18:26
  • You can set the min and max axis values, which limits what is displayed. It might be easier to understand the issue if you could post a link to a screenshot of what the data and your result look like.
    – fixer1234
    Mar 26, 2015 at 18:32
  • image 1 imgur.com/XFB5y1R,dBtbnpW#0 image 2 imgur.com/XFB5y1R,dBtbnpW#1 as you can see the 2 histograms dont have the same scale or range on the x axis
    – A Banitaba
    Mar 26, 2015 at 19:05
  • One thing that isn't clear: your two examples don't have overlapping ranges, so the type of standard, limited range you describe would exclude the entire second chart. Can you clarify?
    – fixer1234
    Mar 26, 2015 at 19:43

1 Answer 1

1

Below's a work-around:

  1. extend the list of data (which used to generate the histogram) with 2 artificial numbers, one for minimum and one for maximum
  2. then change the color (also line color) of the two artificial bins to transparent to make them invisible.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .