Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for drawing box plots #758

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

vhotspur
Copy link

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.

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

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
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
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
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.

None yet

3 participants