Create histogram for continuous data

normajean

New Member
Joined
Mar 13, 2014
Messages
14
Hi all,

Anyone know how to create a histogram for continuous data?

I want an x axis that begins at 0, then half a unit to the right i need it to start at 150 and finish at 200 at 10 unit intervals (classes). Between each of these 10 unit intervals must be a column (no gaps between columns). After the 200 mark I need another half unit just to finish the axis. Axis tick marks need to be on the outside.

x y
150-160 10
160-170 25
170-180 35
180-190 28
190-200 12

(but the x axis labels cant be "150 - 160"; i need "150" at the first tick mark, then "160" at the second tick mark, and so on. I've just provided the range above because they are columns representing a range)

I can create a column graph and delete the axis labels and put them in as text boxes to get the labeling right. But I can't get a half space at the beginning or at the end.

I have also managed to get pretty close by using error bars. Unfortunately I can't get them to show as tick marks on the outside because to allow them to show, I need to extend the vertical axis below zero.
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Guys I think I just about have it now.

I created a fake x axis and a fake y axis using x y scatterplots and error bars. The 'real' x and y axes had to be extended down and tothe left, respectively, to allow both sets of error bars to show. Then Iselected not the show the 'real' x and y axes. Then I just need to put in the axis labels as text boxes and the axes are done.

I also needed horizontal major grid lines. So I created those with error bars as well. HOWEVER, these error bars are in front of my columns. I'm now trying to figure out how to get the error bars for the gridlines BEHIND the columns. Any ideas?
 
Upvote 0
It seems Excel always puts lines over columns in combination charts. See if this alternative method works for you.

This is the data to chart. The first column is text, not numbers. The top left cell is blank. If you add a label, Excel will coerce the labels in the first column into a data series.

DataDummy
0035
1501035
1602535
1703535
1802835
1901235
20035

<tbody>
</tbody>

Fig 1 — Plot the data as a column chart. I deleted the title and the legend. The horizontal axis is set to 2 pts, dark red, with outside ticks to emphasize it here.

Fig 2 — The Dummy series is put on the secondary vertical axis. Add the secondary horizontal axis. You can add this axis from the chart's plus-icon menu.

Fig 3 — Delete the secondary vertical axis. The secondary horizontal axis is set to no line and no tick marks (you can do this later, if you wish). The Dummy series is set to no fill and no line.

Fig 4 — The secondary horizontal axis position is set to "On tick marks".

Fig 5 — With the secondary horizontal axis selected, from the formatting panel, under the column-chart icon, in the section "Labels", set the "Label position" to "Low". Repeat for the primary horizontal axis, but set the "Label position" to "High".

Fig 6 — Do not delete the primary axis. To hide the labels, set the font to white. Remove the last point from the "Data" series. You can remove this point either with the mouse, by moving the cell selection grab-handle, Fig 7, or by editing the series with the Select Data...>>Edit series dialogs, Fig 8.

A53qDpk.png


C9O5PMc.png
 
Upvote 0
I read the original post again. If you wish to have a blank position at the horizontal right end, simply start with this data:

DataDummy
0035
1501035
1602535
1703535
1802835
1901235
200035
21035

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,667
Members
449,462
Latest member
Chislobog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top