Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed bug in mpl ErrorBars
  • Loading branch information
philippjfr committed Sep 19, 2016
1 parent a026943 commit 4b524bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion holoviews/plotting/mpl/chart.py
Expand Up @@ -110,7 +110,7 @@ def get_data(self, element, ranges, style):
dims = element.dimensions()
xs, ys = (element.dimension_values(i) for i in range(2))
yerr = element.array(dimensions=dims[2:4])
style['yerr'] = yerr.T if len(dims) > 3 else yerr
style['yerr'] = yerr.T if len(dims) > 3 else yerr[:, 0]
return (xs, ys), style, {}


Expand Down
8 changes: 7 additions & 1 deletion tests/testplotinstantiation.py
Expand Up @@ -8,7 +8,7 @@
import numpy as np
from holoviews import (Dimension, Overlay, DynamicMap, Store, NdOverlay)
from holoviews.element import (Curve, Scatter, Image, VLine, Points,
HeatMap, QuadMesh, Spikes)
HeatMap, QuadMesh, Spikes, ErrorBars)
from holoviews.element.comparison import ComparisonTestCase
from holoviews.streams import PositionXY

Expand Down Expand Up @@ -73,6 +73,12 @@ def test_dynamic_streams_refresh(self):
post = mpl_renderer(plot, fmt='png')
self.assertNotEqual(pre, post)

def test_errorbar_test(self):
errobars = ErrorBars(([0,1],[1,2],[0.1,0.2]))
plot = mpl_renderer.get_plot(errorbars)
plot.initialize_plot()



class TestBokehPlotInstantiation(ComparisonTestCase):

Expand Down

0 comments on commit 4b524bf

Please sign in to comment.