# How do you plot a histogram in LibreOffice Calc?

msayanvala
11 1 2 3
cloph
2802 4 18 43

I have easily found how to plot a column bar graph on Calc, but what if I want to plot a histogram where for example, I have the following data:

Score : Frequency
39    : 2
40    : 6
41    : 7
42    : 1
43    : 3
44    : 1


And I want to plot a histogram of the.

delete close retag edit

Sort by » oldest newest most voted

cloph
2802 4 18 43

The column chart is a histogram, isn't it?

If you're only talking about the optic of it, reduce the horizontal spacing by selecting the data-series in the chart, and clicking on "Format Selection". On the Options tab set spacing to 0%.

horst
1840 11 29

@roberto You can make a feature request / enhancement here. You have to register.

( 2013-01-18 10:15:34 +0200 )edit

hotlix
11 1 2

You could use the frequency() function provided in Calc. I gave a more detailed explanation here: Plotting Histograms in Calc

roberto
1

It seems that Calc doesn't provide a tool to create a real histogram. Providing such a tool would imply the user being able to select the kind of frequency (relative, absolute), interval lenght (or intervla limits, or number of intervals), among other features. Where can we make a feature request for this missing tool?

santam
1

You can probably get something close to a histogram by using the area type chart. Choose the 1st column as the category and 2nd as the value and you will get a area curve. Technically a histogram is supposed to represent a continuous distribution so dont know if this is correct.

ROSt52
1794 30 30

I think cloph is right when he writes:

The column chart is a histogram, isn't it?

Looking into wikipedia (https://en.wikipedia.org/wiki/Histogram) one finds:

In statistics, a histogram is a graphical representation showing a visual impression of the distribution of data.

I wonder now which type of histograms are not available in LibO?

Could msayanvala and roberto possibly give some explicit examples of missing elements?

w_whalley
1581 10 24

Here's a method that might give you something usable.

In cell A1 enter your bin size (it can be adjusted later).

In cell A2 enter your lowest value.

In cell A3 enter =A1+$A$1. Drag the formula in A3 down as far as desired. These are your bins. Each cell contains the incremental count.

Assuming your data is somewhere in a range named "data", enter this in cell B3, =(COUNTIF(data,"<"&A3))-SUM($B$2:B2) Drag this formula down to the end of your bins.

To plot, select the bins and data, then choose XY (scatter) chart type then Lines only.

Adjust the bins value to give the result you want.

## Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!