Histogram

Hello,


So I exported a .txt file into Numbers in order to make a histogram. However, I cannot figure out how to set up the data correctly in order to make the x and y axes correct. The data is in three columns: first is the initial x value, then the sequential x value (making it a range), and finally the frequency (which I want to be the y value). How can I do this without typing, for example, x1 to x2 for each interval I want? I have attached a picture of what my current data layout is. Thank you.

Posted on Jul 2, 2019 4:16 PM

Reply
5 replies

Jul 3, 2019 1:07 PM in response to SGIII

So the chart on the right is what the current data table displays in a bar graph format. However, since this is a histogram, there should not be any negative y-values. The columns labeled "initial" and "sequential" represent the x-ranges. For example, in row 3, I want the x-range to be -9.708 and -9.680 and have a frequency of 1.

Jul 3, 2019 10:53 PM in response to philk3

Hi Phil,


As every initial value, except the first, is the sequential value in the previous row, one of those two columns is redundant.


I would add a row above the current row 2, enter the value (-9.708) from B2 (B3 after adding the new row) into the new C2, then ignore column B. (initial).

Leave the new cell in the Frequency column empty, or enter a zero.

Select columns C (Sequential) and D (Frequency)


If you want a bar graph (which is a category graph) Copy the two selected columns, paste them into a new two column table, with column A set as a Header column and row 1 set as a Header row.


With both columns selected, choose Bar graph from the Charts button menu, then make whatever customisation touches you need.

The bar graph will use each 'Sequential' value in column A as a category, and include as many of these values as will comfortably fit as 'category labels on the Category (horizontal) axis, and will use the corresponding Frequency value to determine the height of the vertical bar for that category. Each bar will show the frequency in the data of values less than or equal to the category label value, and greater than the category label value for the previous category.


Regards,

Barry


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Histogram

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.