Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSat, 18 Nov 2017 16:48:59 +0100Plotting histograms in calc?https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/I frequently have to plot frequency of occurrence of values using varying window sizes and it is frustrating apparently not to be able to do it in Calc without having to pre-process the data in some way. Does anyone have a solution? Is it a feature we can expect "real soon now"?
My dataset sizes can vary between a few objects up to hundreds and beyond and I need to be able to adjust the "bucket" size. In theory it should be straightforward... ;-)
Thanks
PS I did actually write a Python program to do it, but it required exporting, reformatting etc etc before I even got to starting the plot.Wed, 30 Jan 2013 16:19:24 +0100https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/Comment by oweng for <p>I frequently have to plot frequency of occurrence of values using varying window sizes and it is frustrating apparently not to be able to do it in Calc without having to pre-process the data in some way. Does anyone have a solution? Is it a feature we can expect "real soon now"?</p>
<p>My dataset sizes can vary between a few objects up to hundreds and beyond and I need to be able to adjust the "bucket" size. In theory it should be straightforward... ;-)</p>
<p>Thanks</p>
<p>PS I did actually write a Python program to do it, but it required exporting, reformatting etc etc before I even got to starting the plot.</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=38796#post-id-38796Duplicate of [this](http://ask.libreoffice.org/en/question/17/) question.Mon, 25 Aug 2014 02:38:55 +0200https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=38796#post-id-38796Comment by endolith for <p>I frequently have to plot frequency of occurrence of values using varying window sizes and it is frustrating apparently not to be able to do it in Calc without having to pre-process the data in some way. Does anyone have a solution? Is it a feature we can expect "real soon now"?</p>
<p>My dataset sizes can vary between a few objects up to hundreds and beyond and I need to be able to adjust the "bucket" size. In theory it should be straightforward... ;-)</p>
<p>Thanks</p>
<p>PS I did actually write a Python program to do it, but it required exporting, reformatting etc etc before I even got to starting the plot.</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=38496#post-id-38496Is this the same as http://ask.libreoffice.org/en/question/19816/ https://bugs.freedesktop.org/show_bug.cgi?id=81530 ?Mon, 18 Aug 2014 17:11:29 +0200https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=38496#post-id-38496Comment by AlanD for <p>I frequently have to plot frequency of occurrence of values using varying window sizes and it is frustrating apparently not to be able to do it in Calc without having to pre-process the data in some way. Does anyone have a solution? Is it a feature we can expect "real soon now"?</p>
<p>My dataset sizes can vary between a few objects up to hundreds and beyond and I need to be able to adjust the "bucket" size. In theory it should be straightforward... ;-)</p>
<p>Thanks</p>
<p>PS I did actually write a Python program to do it, but it required exporting, reformatting etc etc before I even got to starting the plot.</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=138390#post-id-138390oweng: Could you please provide a working link?Sat, 18 Nov 2017 16:48:59 +0100https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=138390#post-id-138390Answer by hotlix for <p>I frequently have to plot frequency of occurrence of values using varying window sizes and it is frustrating apparently not to be able to do it in Calc without having to pre-process the data in some way. Does anyone have a solution? Is it a feature we can expect "real soon now"?</p>
<p>My dataset sizes can vary between a few objects up to hundreds and beyond and I need to be able to adjust the "bucket" size. In theory it should be straightforward... ;-)</p>
<p>Thanks</p>
<p>PS I did actually write a Python program to do it, but it required exporting, reformatting etc etc before I even got to starting the plot.</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=17364#post-id-17364A histogram is basically a graph of frequencies vs. categories (i.e. ranges of values indicated by bins), so you could use the frequency() function provided. It's an "array" function, meaning you need to highlight the range of cells you want filled with the results. [Here's a FAQ on this function.](https://help.libreoffice.org/Calc/Array_Functions#FREQUENCY)
Basically, you need to start with a column listing your data (e.g. scores on an exam?), a 2nd column with bins (e.g. 0, 10, 20, ..., 80, 90, 100), and a third column for frequencies. Highlight the cells in your frequency column (should be one less cells than your # bins, since the bins indicate the range for each category) and enter the formula as follows:
=frequency(data,classes)
"data" are your data that you want a to create a histogram to describe. "classes" would be the bins you've chosen to specify the ranges for each category.
If you've entered the formula correctly you just need to plot the values it gave with a bar chart. It might take a bit of fooling around, but it works well, and it's a very effective way to make histograms of all types.
Sun, 12 May 2013 03:17:25 +0200https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=17364#post-id-17364Answer by PeterD for <p>I frequently have to plot frequency of occurrence of values using varying window sizes and it is frustrating apparently not to be able to do it in Calc without having to pre-process the data in some way. Does anyone have a solution? Is it a feature we can expect "real soon now"?</p>
<p>My dataset sizes can vary between a few objects up to hundreds and beyond and I need to be able to adjust the "bucket" size. In theory it should be straightforward... ;-)</p>
<p>Thanks</p>
<p>PS I did actually write a Python program to do it, but it required exporting, reformatting etc etc before I even got to starting the plot.</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=11165#post-id-11165Thx, but it doesn't really answer it. The problem is that data is in general unsorted, so that we need to be able to specify a column and have the algorithm first sort the data into as/descending order and within each bucket (ie selected plotting interval) count the number of occurences. The results should be offered as a simple column histogram chart. It's the first step that the current package fails to offer. it **ought** to be straightforward; the parameters are column containing data and bucket width.Fri, 01 Feb 2013 00:05:14 +0100https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=11165#post-id-11165Comment by jondo for <p>Thx, but it doesn't really answer it. The problem is that data is in general unsorted, so that we need to be able to specify a column and have the algorithm first sort the data into as/descending order and within each bucket (ie selected plotting interval) count the number of occurences. The results should be offered as a simple column histogram chart. It's the first step that the current package fails to offer. it <strong>ought</strong> to be straightforward; the parameters are column containing data and bucket width.</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=26968#post-id-26968PeterD, this should have better been a comment to an answer (which one?) instead of a separate new answer.Mon, 09 Dec 2013 13:43:00 +0100https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=26968#post-id-26968Answer by horst for <p>I frequently have to plot frequency of occurrence of values using varying window sizes and it is frustrating apparently not to be able to do it in Calc without having to pre-process the data in some way. Does anyone have a solution? Is it a feature we can expect "real soon now"?</p>
<p>My dataset sizes can vary between a few objects up to hundreds and beyond and I need to be able to adjust the "bucket" size. In theory it should be straightforward... ;-)</p>
<p>Thanks</p>
<p>PS I did actually write a Python program to do it, but it required exporting, reformatting etc etc before I even got to starting the plot.</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=12366#post-id-12366Check my answer in this question (http://ask.libreoffice.org/en/question/12192/percentage-based-histogram/). Could be a solution for you.Sun, 17 Feb 2013 17:41:44 +0100https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=12366#post-id-12366Answer by jondo for <p>I frequently have to plot frequency of occurrence of values using varying window sizes and it is frustrating apparently not to be able to do it in Calc without having to pre-process the data in some way. Does anyone have a solution? Is it a feature we can expect "real soon now"?</p>
<p>My dataset sizes can vary between a few objects up to hundreds and beyond and I need to be able to adjust the "bucket" size. In theory it should be straightforward... ;-)</p>
<p>Thanks</p>
<p>PS I did actually write a Python program to do it, but it required exporting, reformatting etc etc before I even got to starting the plot.</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=26967#post-id-26967The "array formula" [FREQUENCY](https://help.libreoffice.org/Calc/Array_Functions#FREQUENCY) creates histogram data from unsorted raw values.Mon, 09 Dec 2013 13:41:12 +0100https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=26967#post-id-26967Answer by horst for <p>I frequently have to plot frequency of occurrence of values using varying window sizes and it is frustrating apparently not to be able to do it in Calc without having to pre-process the data in some way. Does anyone have a solution? Is it a feature we can expect "real soon now"?</p>
<p>My dataset sizes can vary between a few objects up to hundreds and beyond and I need to be able to adjust the "bucket" size. In theory it should be straightforward... ;-)</p>
<p>Thanks</p>
<p>PS I did actually write a Python program to do it, but it required exporting, reformatting etc etc before I even got to starting the plot.</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=11023#post-id-11023Read the answers in [this question](http://ask.libreoffice.org/en/question/17/how-do-you-plot-a-histogram-in-libreoffice-calc/). Might help ;-)).Wed, 30 Jan 2013 18:46:27 +0100https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?answer=11023#post-id-11023Comment by Aaron Digulla for <p>Read the answers in <a href="http://ask.libreoffice.org/en/question/17/how-do-you-plot-a-histogram-in-libreoffice-calc/">this question</a>. Might help ;-)).</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=51199#post-id-51199The link is brokenWed, 27 May 2015 21:32:46 +0200https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=51199#post-id-51199Comment by AlanD for <p>Read the answers in <a href="http://ask.libreoffice.org/en/question/17/how-do-you-plot-a-histogram-in-libreoffice-calc/">this question</a>. Might help ;-)).</p>
https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=138389#post-id-138389Could you please update your answer with a working link?Sat, 18 Nov 2017 16:48:35 +0100https://ask.libreoffice.org/en/question/11015/plotting-histograms-in-calc/?comment=138389#post-id-138389