Bug 70361 - Add box plot (a.k.a. box-and-whiskers plot) chart type
Summary: Add box plot (a.k.a. box-and-whiskers plot) chart type
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.0.4.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Additional-Chart-Types
  Show dependency treegraph
 
Reported: 2013-10-11 02:54 UTC by Olivier Diotte
Modified: 2024-03-09 20:09 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of box plot chart type. (5.85 KB, image/png)
2014-02-04 04:07 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Diotte 2013-10-11 02:54:12 UTC
Gnumeric already has this builtin, so maybe the code can be refactored? (if licences are compatible)
Comment 1 Jorendc 2013-10-15 19:57:44 UTC
Valid enhancement request. Can't find any duplicate.
Marking as NEW and as enhancement.
Comment 2 M Henri Day 2014-02-03 19:13:23 UTC
This would be a valuable feature to the no few users who write articles for publication in scientific journals ; moreover, it would be a feature which, for example, MS Office does not possess. Perhaps a developer could be convinced to take a look and see if the game would indeed be worth the candle ?...

Henri
Comment 3 Owen Genat (retired) 2014-02-04 04:07:10 UTC
Created attachment 93332 [details]
Example of box plot chart type.

I am attaching an example of this type of chart for clarity. It appears to be similar to the stock (a.k.a. candlestick) chart but rather than four Y values (open, close, maximum, and minimum) per X value, there are:

- Upper whisker (upper horiz. thin line == maximum)
- 3rd quartile (top of box / bar)
- Median (thick line across box / bar)
- 1st quartile (bottom of box / bar)
- Lower whisker (lower horiz. thin line == minimum)

Currently, this type of chart is not specified in ODF v1.2.
Comment 4 Owen Genat (retired) 2014-02-04 04:14:11 UTC
Summary edited for clarity and so it shows up in searches for "chart".

I should also have been clearer in my last comment / example that the top and bottom box values (which I listed as "quartile") can be variable i.e., a custom percentile.
Comment 5 Olivier Diotte 2014-02-04 11:01:33 UTC
(In reply to comment #3)
> - Upper whisker (upper horiz. thin line == maximum)
> - 3rd quartile (top of box / bar)
> - Median (thick line across box / bar)
> - 1st quartile (bottom of box / bar)
> - Lower whisker (lower horiz. thin line == minimum)
> 

It should be noted that the whiskers are not always the maximum and minimum, but rather something like 1.5[1] the IQR (Inter Quartile Range). One of the most useful features of a box plot is that it allows you to see if there are extreme values.

[1] I say "something like" because there are apparently a few different styles. Another is 2 times the IQR IIRC.


To be exact, here's how my math book does one:

      Li   Q1______Md_____Q3       Ls
x x x |-----[______|______|--------|     x x

Where: 'x' are extreme values
IQR = Q3 - Q1
Li = max{minimum value, Q1 - 1.5 * IQR}
Ls = min{maximum value, Q3 + 1.5 * IQR}
Extreme values are those that are x such that x < Li or Ls < x

I do not know exactly which of these rules vary (I only know the "1.5" can).
Comment 6 Olivier Diotte 2014-02-04 11:06:39 UTC
http://web.pdx.edu/~stipakb/download/PA551/boxplot.html this page seems to discuss all the types of boxplots
Comment 7 Owen Genat (retired) 2014-02-08 04:51:05 UTC
Many thanks Olivier for clarify my poor attempt, the link in particular is excellent. Related Apache OO issue and OASIS issue added to the See Also list. I have sent an email to the OASIS office-comment mailing list to bring this bug to their attention, as the box plot chart type is indicated as being included in ODF v1.3.
Comment 8 Olivier Delaune 2014-05-27 12:41:17 UTC
Hi! Do you have any news about that?
Comment 9 Gerry 2015-08-09 09:23:28 UTC
For competitive comparison, MS Office 2016 is going to implement a Box plot chart type: https://blogs.office.com/2015/07/02/introducing-new-and-modern-chart-types-now-available-in-office-2016-preview/
Comment 10 Ian L 2015-09-07 14:53:15 UTC
Comparison of multiple Box plots scaled on the same scale is an essential tool for data visualisation.  I urge that this feature is created as a matter of urgency.

There is a decent basic implementation here where all the boxes are plotted on a common scale, but which is not "open", in so far as the production of the plot in OpenOffice Draw is not transparent and cannot easily be ammended or added to:
http://www.westmont.edu/~phunter/ma5/oo/boxplots.html

It has the drawbacks of not permitting the setting of "fences" (to determine outliers) nor does it allow the plotting of the mean as well as the median. 

The following project appears not to be active:

http://extensions.libreoffice.org/extension-center/advance-office-chart
Comment 11 Ian L 2015-09-09 08:30:45 UTC
I've worked out how to ammend the macros.
Please ignore my statement ", but which is not "open", in so far as the production of the plot in OpenOffice Draw is not transparent and cannot easily be ammended or added to:" That is simply not true.

(In reply to Ian L from comment #10)
> Comparison of multiple Box plots scaled on the same scale is an essential
> tool for data visualisation.  I urge that this feature is created as a
> matter of urgency.
> 
> There is a decent basic implementation here where all the boxes are plotted
> on a common scale, but which is not "open", in so far as the production of
> the plot in OpenOffice Draw is not transparent and cannot easily be ammended
> or added to:
> http://www.westmont.edu/~phunter/ma5/oo/boxplots.html
> 
> It has the drawbacks of not permitting the setting of "fences" (to determine
> outliers) nor does it allow the plotting of the mean as well as the median. 
> 
> The following project appears not to be active:
> 
> http://extensions.libreoffice.org/extension-center/advance-office-chart
Comment 12 Alexander W. Janssen 2015-12-05 09:10:32 UTC
(In reply to Ian L from comment #10)
> The following project appears not to be active:
> 
> http://extensions.libreoffice.org/extension-center/advance-office-chart

However, I can't download any release, neither stable nor experimental?
Comment 13 Phil 2019-12-03 13:42:23 UTC
IN LO 6.3 the box plot (a.k.a. box-and-whiskers plot) chart type is still not implemented.

There is a clumpsy work around, as with MS-Excel version 2013 and anterior.
https://www.youtube.com/watch?v=JSb-iKq0L5s

This is implemented in Excel since version 2016.

It's strange to have canddle bar chart(4 values: open,close, min, max), but not boxplot(5 values, often: min, Q1, median, Q3, max) as they seems relatively similar.
Comment 14 Phil 2019-12-03 13:48:04 UTC
I wanted to follow a homework of my son (4th year secondary school) with LO in place of Excel, but couldn't.

It's sad that LibreCalc is discarded from school tuition, because, it has the ability to perform the chart.
Comment 15 Alun J. Carr 2021-06-14 16:54:03 UTC
I hate to say it, but I find it *very* frustrating that this essential stats tool has not been added to LO several major releases and 8 years later. As has been pointed out, Gnumeric offers this facility, so why not LO?
Comment 16 Jean-Baptiste Faure 2021-06-15 07:26:49 UTC
(In reply to Alun J. Carr from comment #15)
> I hate to say it

If you hate to say it, don't hurt yourself and don't say it.

> so why not LO?

Because nobody is interested or paid enough to implement it.

Before changing version number, please read the label : "earliest affected".

Best regards. JBF
Comment 17 andis.lazdins 2021-12-07 14:59:58 UTC
I'm testing Gnumeric in making Boxplot diagrams. My colleges, which are more advanced, uses R Studio. Unfortunately in scientific writing nowadays there is no way without Boxplot diagrams and lack of this feature is significant weakness.

I would be happy to make targeted donation to implement this feature, and I guess many others from research community would do the same.
If the main issue is funding, probably it is possible to add notes to the donations section so that funds can go specifically to this feature. It would be also important to understand, how much money is necessary and if there is a developer willing and able to implement this feature in LibreOffice.
Comment 18 Eyal Rozenberg 2024-03-09 20:09:24 UTC
gnuplot has this since forever...