def test_errorbars_range_y_explicit_lower(self): r = ErrorBars(([1, 2, 3], [2, 3, 4], [0.5, 0.5, 0.5]), vdims=[Dimension('y', range=(0., None)), 'yerr']).range(1) self.assertEqual(r, (0., 4.5))
def test_errorbars_string_signature(self): errorbars = ErrorBars([], 'a', ['b', 'c']) self.assertEqual(errorbars.kdims, [Dimension('a')]) self.assertEqual(errorbars.vdims, [Dimension('b'), Dimension('c')])
def test_errorbars_range_y(self): r = ErrorBars(([1, 2, 3], [2, 3, 4], [0.5, 0.5, 0.5])).range(1) self.assertEqual(r, (1.5, 4.5))
def test_errorbars_range_x_explicit_lower(self): r = ErrorBars(([1, 2, 3], [2, 3, 4], [0.5, 0.5, 0.5]), kdims=[Dimension('x', range=(-1, None))]).range(0) self.assertEqual(r, (-1., 3.))
def test_errorbars_range_x(self): r = ErrorBars(([1, 2, 3], [2, 3, 4], [0.5, 0.5, 0.5])).range(0) self.assertEqual(r, (1., 3.0))
def test_errorbars_range_explicit_horizontal(self): r = ErrorBars(([1, 2, 3], [2, 3, 4], [0.5, 0.5, 0.5]), kdims=[Dimension('x', range=(-1, 4.))], vdims=['y', 'xerr'], horizontal=True).range(0) self.assertEqual(r, (-1., 4.))
def test_errorbars_range_horizontal(self): r = ErrorBars(([1, 2, 3], [2, 3, 4], [0.5, 0.5, 0.5]), horizontal=True).range(0) self.assertEqual(r, (0.5, 3.5))