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: Other All
: medium enhancement
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-11 02:54 UTC by Olivier Diotte
Modified: 2016-07-21 15:55 UTC (History)
6 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?