Skip to content

Commit

Permalink
Replace bkcharts based BoxWhisker with pure bokeh implementation (#1604)
Browse files Browse the repository at this point in the history
* Added CompositeElementPlot bokeh class

* Removed all bkcharts based code

* Added initial bokeh BoxWhisker implementation

* Added support for CompositePlot styling

* Added support for coloring and adding legend to BokehBoxPlot

* Small fix for CompositeElementPlot

* Added default styling for bokeh BoxWhiskerPlot

* Fixed undefined variable bug

* Improved bokeh BoxWhiskerPlot

* Correctly invert bokeh range types

* Append renderers to HoverTool

* Fixes for overlaid BoxWhiskerPlot

* Small fix to ElementPlot

* Handle datetimes

* Py3 scoping fix in BoxWhiskerPlot class definition

* Cleaned up and optimized bokeh BoxWhiskerPlot

* Small fix for BoxWhiskerPlot legend

* Small boxwhisker unit test fix

* Minor cleanup for bokeh BoxWhiskerPlot
  • Loading branch information
philippjfr authored and jlstevens committed Jun 25, 2017
1 parent d57bfb6 commit eaefeab
Show file tree
Hide file tree
Showing 6 changed files with 369 additions and 249 deletions.
13 changes: 5 additions & 8 deletions holoviews/plotting/bokeh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
DFrame = None

from .annotation import TextPlot, LineAnnotationPlot, SplinePlot
from .bkcharts import BoxPlot
from .callbacks import Callback # noqa (API import)
from .element import OverlayPlot, ElementPlot
from .chart import (PointPlot, CurvePlot, SpreadPlot, ErrorPlot, HistogramPlot,
SideHistogramPlot, BarPlot, SpikesPlot, SideSpikesPlot,
AreaPlot, VectorFieldPlot)
AreaPlot, VectorFieldPlot, BoxWhiskerPlot)
from .path import PathPlot, PolygonPlot, ContourPlot
from .plot import GridPlot, LayoutPlot, AdjointLayoutPlot
from .raster import RasterPlot, RGBPlot, HeatmapPlot, HSVPlot, QuadMeshPlot
Expand All @@ -47,6 +46,8 @@

# Charts
Curve: CurvePlot,
Bars: BarPlot,
BoxWhisker: BoxWhiskerPlot,
Points: PointPlot,
Scatter: PointPlot,
ErrorBars: ErrorPlot,
Expand Down Expand Up @@ -96,12 +97,6 @@
AdjointLayoutPlot.registry[Histogram] = SideHistogramPlot
AdjointLayoutPlot.registry[Spikes] = SideSpikesPlot

try:
import pandas # noqa (Conditional import)
Store.register({BoxWhisker: BoxPlot,
Bars: BarPlot}, 'bokeh')
except ImportError:
pass

point_size = np.sqrt(6) # Matches matplotlib default
Cycle.default_cycles['default_colors'] = ['#30a2da', '#fc4f30', '#e5ae38',
Expand All @@ -122,6 +117,8 @@ def colormap_generator(palette):

# Charts
options.Curve = Options('style', color=Cycle(), line_width=2)
options.BoxWhisker = Options('style', box_fill_color=Cycle(), whisker_color='black',
box_line_color='black', outlier_color='black')
options.Scatter = Options('style', color=Cycle(), size=point_size, cmap=dflt_cmap)
options.Points = Options('style', color=Cycle(), size=point_size, cmap=dflt_cmap)
options.Histogram = Options('style', line_color='black', fill_color=Cycle())
Expand Down
144 changes: 0 additions & 144 deletions holoviews/plotting/bokeh/bkcharts.py

This file was deleted.

Loading

0 comments on commit eaefeab

Please sign in to comment.