First time here? Check out the FAQ!
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.
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%.
You could use the frequency() function provided in Calc. I gave a more detailed explanation here: Plotting Histograms in Calc
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?
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.
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?
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.
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!
Asked: 2012-02-18 11:26:22 +0200
Seen: 8,582 times
Last updated: yesterday
Calc - go to chart datapoint value cell
Calc chart "same" value date X axis
Data labels are overlapping in a stock chart
Add spaces left/right X axis | Line Chart
To display two cells contents together in another cell
How to hide the escape character before equal sign?
Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.