Skip to content

Add option for drawing box plots#758

Open
vhotspur wants to merge 4 commits intodanvk:masterfrom
vhotspur:master
Open

Add option for drawing box plots#758
vhotspur wants to merge 4 commits intodanvk:masterfrom
vhotspur:master

Conversation

@vhotspur
Copy link
Copy Markdown

The PR adds boxplot: true option to plot the data as box plots. The data has to be precomputed, i.e. user specifies values for the whiskers and the box, not raw samples (outliers are not supported).

The data are expected to have 5 (median, first and third quartile and position of the whiskers) or 6 values (if the point is not median but average, for example).

An example was added to the gallery to demonstrate this feature.

vhotspur added 4 commits June 27, 2016 08:34
If boxplot option is given, data are expected to be a tuple of five
values (median,min,first quartile,third quartile,max) and instead of
simple point, boxplot is drawn.

Also added a simple example to gallery.
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.5%) to 89.226% when pulling fd674a3 on vhotspur:master into 287c4d6 on danvk:master.

@vhotspur vhotspur changed the title Add posibility to draw box plots Add option for drawing box plots Jul 11, 2016
@danvk
Copy link
Copy Markdown
Owner

danvk commented Aug 2, 2016

Is this different than the candlestick plotter in http://dygraphs.com/tests/plotters.html and #538?

@vhotspur
Copy link
Copy Markdown
Author

vhotspur commented Aug 3, 2016

Is this different than the candlestick plotter in http://dygraphs.com/tests/plotters.html and #538?

Although they are visually similar, there are several differences. Boxplot allows you to display basic properties of the distribution behind any generic data, candlestick chart targets financial community only (fixed meaning of colors and shadows). A boxplot requires 5 values to be drawn (the patch do not handle outliers), candlestick needs only 4 (it misses the middle line with median). And there are also some subtle visual differences (the median line, shadow vs whisker).

The values displayed by the boxplot can be probably somehow emulated by the candlestick chart and extra serie for the medians. But there would be still the small visual difference that complicates "reading" the graph.

@vhotspur
Copy link
Copy Markdown
Author

@danvk what do you think about this PR? Do I need to document it more, add more tests or something else is missing? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants