Closed malekop closed 2 years ago
We'd love to have support for a Plotly backend for hvPlot (and for a Matplotlib backend), but currently only Bokeh is available as a backend. The underlying HoloViews library already supports Plotly and Matplotlib, but enabling that support in hvPlot for either Matplotlib or Plotly is a time-consuming project involving translating between the Pandas .plot() API and the underlying HoloViews option syntax for each of the available plot types. Setting up all those translations is a suitable project for a Plotly (or Matplotlib) user to contribute (with core-developer guidance); we've done it ourselves for Bokeh because at present we are mainly using Bokeh.
I ran into this issue as well as I am using hvPlot to generate plots and would allow the user to select the
BACKENDS = ["bokeh", "plotly", "matplotlib"] KINDS = ["area", "bar", "barh", "line", "scatter", "step", "table"]
Thought this was supported. But apparently not. Would be a killer feature (and add vega-lite and echarts to the mix :-))
import itertools
import holoviews as hv
import hvplot.pandas
import pandas as pd
import plotly
import pytest
hv.extension("plotly", "matplotlib")
BACKENDS = ["bokeh", "plotly", "matplotlib"]
KINDS = ["area", "bar", "barh", "line", "scatter", "step", "table"]
@pytest.fixture()
def data():
return pd.DataFrame({"x": [1, 2, 3], "y": [2, 4, 1],})
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
data.hvplot(x="x", y="y", kind=kind)
$ pytest 'scripts\test_backends.py'
Test session starts (platform: win32, Python 3.7.6, pytest 5.4.2, pytest-sugar 0.9.3)
rootdir: C:\repos\private\awesome-panel, inifile: pytest.ini
plugins: cov-2.8.1, mock-3.1.0, sugar-0.9.3
collecting ...
scripts/test_backends.py ✓ 5% ▌
scripts/test_backends.py ✓✓ 10% ▉
scripts/test_backends.py ✓✓✓ 14% █▌
scripts/test_backends.py ✓✓✓✓ 19% █▉
scripts/test_backends.py ✓✓✓✓✓ 24% ██▍
scripts/test_backends.py ✓✓✓✓✓✓ 29% ██▉
scripts/test_backends.py ✓✓✓✓✓✓✓ 33% ███▍
―――――――――――――――――――――――――――――――――――― test_backend_kind[plotly-area] ――――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'plotly', kind = 'area'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1336: in area
areas = self.chart(Area, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1303: in chart
return self.single_chart(element, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'alpha', objtype = 'Area', backend = 'plotly'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'aspect', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
(opt, objtype, backend, matches))
else:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. No '
'similar options founds.' %
> (opt, objtype, backend))
E ValueError: Unexpected option 'alpha' for Area type when using the 'plotly' extension. No similar options founds.
.venv\lib\site-packages\holoviews\util\__init__.py:398: ValueError
scripts/test_backends.py ⨯ 38% ███▊
―――――――――――――――――――――――――――――――――――― test_backend_kind[plotly-bar] ―――――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'plotly', kind = 'bar'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1386: in bar
return self.single_chart(Bars, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'bar_width', objtype = 'Bars', backend = 'plotly'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'aspect', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
> (opt, objtype, backend, matches))
E ValueError: Unexpected option 'bar_width' for Bars type when using the 'plotly' extension. Similar options are: ['width'].
.venv\lib\site-packages\holoviews\util\__init__.py:393: ValueError
scripts/test_backends.py ⨯ 43% ████▍
―――――――――――――――――――――――――――――――――――― test_backend_kind[plotly-barh] ――――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'plotly', kind = 'barh'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1390: in barh
return self.bar(x, y, data).opts('Bars', invert_axes=True)
.venv\lib\site-packages\hvplot\converter.py:1386: in bar
return self.single_chart(Bars, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'bar_width', objtype = 'Bars', backend = 'plotly'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'aspect', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
> (opt, objtype, backend, matches))
E ValueError: Unexpected option 'bar_width' for Bars type when using the 'plotly' extension. Similar options are: ['width'].
.venv\lib\site-packages\holoviews\util\__init__.py:393: ValueError
scripts/test_backends.py ⨯ 48% ████▊
―――――――――――――――――――――――――――――――――――― test_backend_kind[plotly-line] ――――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'plotly', kind = 'line'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1326: in line
return self.chart(Curve, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1303: in chart
return self.single_chart(element, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'muted_alpha', objtype = 'Curve', backend = 'plotly'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'aspect', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
(opt, objtype, backend, matches))
else:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. No '
'similar options founds.' %
> (opt, objtype, backend))
E ValueError: Unexpected option 'muted_alpha' for Curve type when using the 'plotly' extension. No similar options founds.
.venv\lib\site-packages\holoviews\util\__init__.py:398: ValueError
scripts/test_backends.py ⨯ 52% █████▎
―――――――――――――――――――――――――――――――――― test_backend_kind[plotly-scatter] ―――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'plotly', kind = 'scatter'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1333: in scatter
return self.chart(Scatter, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1303: in chart
return self.single_chart(element, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'legend_position', objtype = 'Scatter', backend = 'plotly'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'aspect', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
(opt, objtype, backend, matches))
else:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. No '
'similar options founds.' %
> (opt, objtype, backend))
E ValueError: Unexpected option 'legend_position' for Scatter type when using the 'plotly'
extension. No similar options founds.
.venv\lib\site-packages\holoviews\util\__init__.py:398: ValueError
scripts/test_backends.py ⨯ 57% █████▊
―――――――――――――――――――――――――――――――――――― test_backend_kind[plotly-step] ――――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'plotly', kind = 'step'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1330: in step
return self.line(x, y, data).options('Curve', interpolation='steps-'+where)
.venv\lib\site-packages\hvplot\converter.py:1326: in line
return self.chart(Curve, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1303: in chart
return self.single_chart(element, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'muted_alpha', objtype = 'Curve', backend = 'plotly'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'aspect', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
(opt, objtype, backend, matches))
else:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. No '
'similar options founds.' %
> (opt, objtype, backend))
E ValueError: Unexpected option 'muted_alpha' for Curve type when using the 'plotly' extension. No similar options founds.
.venv\lib\site-packages\holoviews\util\__init__.py:398: ValueError
scripts/test_backends.py ⨯ 62% ██████▎
scripts/test_backends.py ⨯✓ 67% ██████▋
―――――――――――――――――――――――――――――――――― test_backend_kind[matplotlib-area] ――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'matplotlib', kind = 'area'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1336: in area
areas = self.chart(Area, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1303: in chart
return self.single_chart(element, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'height', objtype = 'Area', backend = 'matplotlib'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'apply_ticks', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
(opt, objtype, backend, matches))
else:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. No '
'similar options founds.' %
> (opt, objtype, backend))
E ValueError: Unexpected option 'height' for Area type when using the 'matplotlib' extension. No similar options founds.
.venv\lib\site-packages\holoviews\util\__init__.py:398: ValueError
scripts/test_backends.py ⨯ 71% ███████▎
―――――――――――――――――――――――――――――――――― test_backend_kind[matplotlib-bar] ―――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'matplotlib', kind = 'bar'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1386: in bar
return self.single_chart(Bars, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'bar_width', objtype = 'Bars', backend = 'matplotlib'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'apply_ticks', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
> (opt, objtype, backend, matches))
E ValueError: Unexpected option 'bar_width' for Bars type when using the 'matplotlib' extension. Similar options are: ['cbar_width'].
.venv\lib\site-packages\holoviews\util\__init__.py:393: ValueError
scripts/test_backends.py ⨯ 76% ███████▋
―――――――――――――――――――――――――――――――――― test_backend_kind[matplotlib-barh] ――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'matplotlib', kind = 'barh'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1390: in barh
return self.bar(x, y, data).opts('Bars', invert_axes=True)
.venv\lib\site-packages\hvplot\converter.py:1386: in bar
return self.single_chart(Bars, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'bar_width', objtype = 'Bars', backend = 'matplotlib'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'apply_ticks', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
> (opt, objtype, backend, matches))
E ValueError: Unexpected option 'bar_width' for Bars type when using the 'matplotlib' extension. Similar options are: ['cbar_width'].
.venv\lib\site-packages\holoviews\util\__init__.py:393: ValueError
scripts/test_backends.py ⨯ 81% ████████▏
―――――――――――――――――――――――――――――――――― test_backend_kind[matplotlib-line] ――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'matplotlib', kind = 'line'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1326: in line
return self.chart(Curve, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1303: in chart
return self.single_chart(element, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'height', objtype = 'Curve', backend = 'matplotlib'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'apply_ticks', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
(opt, objtype, backend, matches))
else:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. No '
'similar options founds.' %
> (opt, objtype, backend))
E ValueError: Unexpected option 'height' for Curve type when using the 'matplotlib' extension. No similar options founds.
.venv\lib\site-packages\holoviews\util\__init__.py:398: ValueError
scripts/test_backends.py ⨯ 86% ████████▋
―――――――――――――――――――――――――――――――― test_backend_kind[matplotlib-scatter] ―――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'matplotlib', kind = 'scatter'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1333: in scatter
return self.chart(Scatter, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1303: in chart
return self.single_chart(element, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'height', objtype = 'Scatter', backend = 'matplotlib'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'apply_ticks', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
(opt, objtype, backend, matches))
else:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. No '
'similar options founds.' %
> (opt, objtype, backend))
E ValueError: Unexpected option 'height' for Scatter type when using the 'matplotlib' extension. No similar options founds.
.venv\lib\site-packages\holoviews\util\__init__.py:398: ValueError
scripts/test_backends.py ⨯ 90% █████████▏
―――――――――――――――――――――――――――――――――― test_backend_kind[matplotlib-step] ――――――――――――――――――――――――――――――――――
data = x y
0 1 2
1 2 4
2 3 1, backend = 'matplotlib', kind = 'step'
@pytest.mark.parametrize(["backend", "kind"], list(itertools.product(BACKENDS, KINDS)))
def test_backend_kind(data, backend, kind):
hv.output(backend=backend)
> data.hvplot(x="x", y="y", kind=kind)
scripts\test_backends.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\lib\site-packages\hvplot\plotting\core.py:72: in __call__
return self._get_converter(x, y, kind, **kwds)(kind, x, y)
.venv\lib\site-packages\hvplot\converter.py:1024: in __call__
obj = method(x, y)
.venv\lib\site-packages\hvplot\converter.py:1330: in step
return self.line(x, y, data).options('Curve', interpolation='steps-'+where)
.venv\lib\site-packages\hvplot\converter.py:1326: in line
return self.chart(Curve, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1303: in chart
return self.single_chart(element, x, y, data)
.venv\lib\site-packages\hvplot\converter.py:1231: in single_chart
return chart.redim(**self._redim).opts(opts)
.venv\lib\site-packages\holoviews\core\accessors.py:45: in pipelined_call
result = __call__(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:557: in __call__
return self._dispatch_opts( *args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:561: in _dispatch_opts
return self._base_opts(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\accessors.py:640: in _base_opts
return self._obj.options(*new_args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:214: in pipelined_fn
result = method_fn(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\data\__init__.py:1165: in options
return super(Dataset, self).options(*args, **kwargs)
.venv\lib\site-packages\holoviews\core\dimension.py:1288: in options
expanded_backends = opts._expand_by_backend(options, backend)
.venv\lib\site-packages\holoviews\util\__init__.py:320: in _expand_by_backend
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:320: in <listcomp>
return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
.venv\lib\site-packages\holoviews\util\__init__.py:374: in _expand_options
cls._options_error(opt, objtype, backend, valid_options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'holoviews.util.opts'>, opt = 'height', objtype = 'Curve', backend = 'matplotlib'
valid_options = ['axiswise', 'framewise', 'backend', 'apply_extents', 'apply_ranges', 'apply_ticks', ...]
@classmethod
def _options_error(cls, opt, objtype, backend, valid_options):
"""
Generates an error message for an invalid option suggesting
similar options through fuzzy matching.
"""
current_backend = Store.current_backend
loaded_backends = Store.loaded_backends()
kws = Keywords(values=valid_options)
matches = sorted(kws.fuzzy_match(opt))
if backend is not None:
if matches:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. Similar '
'options are: %s.' %
(opt, objtype, backend, matches))
else:
raise ValueError('Unexpected option %r for %s type '
'when using the %r extension. No '
'similar options founds.' %
> (opt, objtype, backend))
E ValueError: Unexpected option 'height' for Curve type when using the 'matplotlib' extension. No similar options founds.
.venv\lib\site-packages\holoviews\util\__init__.py:398: ValueError
scripts/test_backends.py ⨯ 95% █████████▌ scripts/test_backends.py ⨯✓ 100% ██████████
======================================= short test summary info ========================================
FAILED scripts/test_backends.py::test_backend_kind[plotly-area] - ValueError: Unexpected option 'alpha...
FAILED scripts/test_backends.py::test_backend_kind[plotly-bar] - ValueError: Unexpected option 'bar_wi...
FAILED scripts/test_backends.py::test_backend_kind[plotly-barh] - ValueError: Unexpected option 'bar_w...
FAILED scripts/test_backends.py::test_backend_kind[plotly-line] - ValueError: Unexpected option 'muted...
FAILED scripts/test_backends.py::test_backend_kind[plotly-scatter] - ValueError: Unexpected option 'le...
FAILED scripts/test_backends.py::test_backend_kind[plotly-step] - ValueError: Unexpected option 'muted...
FAILED scripts/test_backends.py::test_backend_kind[matplotlib-area] - ValueError: Unexpected option 'h...
FAILED scripts/test_backends.py::test_backend_kind[matplotlib-bar] - ValueError: Unexpected option 'ba...
FAILED scripts/test_backends.py::test_backend_kind[matplotlib-barh] - ValueError: Unexpected option 'b...
FAILED scripts/test_backends.py::test_backend_kind[matplotlib-line] - ValueError: Unexpected option 'h...
FAILED scripts/test_backends.py::test_backend_kind[matplotlib-scatter] - ValueError: Unexpected option...
FAILED scripts/test_backends.py::test_backend_kind[matplotlib-step] - ValueError: Unexpected option 'h...
Results (7.97s):
9 passed
12 failed
- scripts/test_backends.py:18 test_backend_kind[plotly-area]
- scripts/test_backends.py:18 test_backend_kind[plotly-bar]
- scripts/test_backends.py:18 test_backend_kind[plotly-barh]
- scripts/test_backends.py:18 test_backend_kind[plotly-line]
- scripts/test_backends.py:18 test_backend_kind[plotly-scatter]
- scripts/test_backends.py:18 test_backend_kind[plotly-step]
- scripts/test_backends.py:18 test_backend_kind[matplotlib-area]
- scripts/test_backends.py:18 test_backend_kind[matplotlib-bar]
- scripts/test_backends.py:18 test_backend_kind[matplotlib-barh]
- scripts/test_backends.py:18 test_backend_kind[matplotlib-line]
- scripts/test_backends.py:18 test_backend_kind[matplotlib-scatter]
- scripts/test_backends.py:18 test_backend_kind[matplotlib-step]
(.venv)
I guess there is also something to consider here as pandas now supports setting a backend and/ or there are alternative plotting backends. So how many backends should hvplot support?
We should be careful to distinguish between hvPlot supporting backends that HoloViews already supports, and any other potential backends. hvPlot is built on HoloViews, and currently supports (a) generating HoloViews objects, and (b) setting up, configuring, and translating user-provided .plot() API options so that the HoloViews objects are configured appropriately for the Bokeh backend.
The result is that hvPlot only currently fully supports Bokeh, in the sense of (a) and (b). Support of type (b) could be added for any other backend supported by HoloViews, namely Matplotlib and Plotly, which would be a straightforward project but would require either a paid project or a dedicated volunteer; no one on the current team is volunteering to support either of these HoloViews backends in conjunction with hvPlot. I personally would love to see that happen for both Matplotlib and hvPlot, and hope that we do get a volunteer or a financial contribution towards either of those two goals, but until one of those two things happens, I do not anticipate seeing a Matplotlib or Plotly backend for hvPlot appear.
Support for other backends not currently supported by HoloViews is an entirely different matter; eplot, altair_pandas, and pandas_bokeh are all entirely unrelated to HoloViews and supporting them in hvPlot would require first adding them as new backends in HoloViews, and only then adding support of type (b) for those backends in hvPlot. Doing so seems like quite a lot of work for no obvious gain; pandas_bokeh doesn't offer any significant functionality not already available in the Bokeh backend, and altair is also mostly duplicative except for styling issues. echarts/Pyecharts I'm less sure of, but with as much effort as is required to add an entirely new backend, I'd urge people just to improve the existing underlying libraries instead (plotly, bokeh, and matplotlib) so that our efforts do not get spread too thin. The three current HoloViews backends offer quite distinct and typically non-overlapping functionality (interactive 3D from Plotly, publication-quality SVG from Matplotlib, server-based interactivity from Bokeh), but there's much more diminishing returns from adding additional HoloViews backends at this point, and until/unless they are added to HoloViews, they can't meaningfully be added to hvPlot.
Thanks for the explanation James.
It's frustrating as I had it all working as desired on an old device using old library versions but I unfortunately can't seem to recreate this setup and now have static box plots again.
Is there an alternative way to produce interactive boxplots using one of the holoviz libraries? I tried to just use holoviews instead of hvplot but if I use Plotly backend then I just don't see an output in my jupyter notebook when I try to plot.
Or are interactive boxplots just not possible anymore?
@malekop I can't reproduce any issues, you'd really have to file an issue with your versions:
hvPlot now supports Plotly as a backend.
I have just moved to a new device and as such have setup a new conda environment with all of the latest libraries installed.
Apologies as I am not sure if this is hvplot or holoviews specific - it appears to affect both.
Since setting up my new conda environment, for the following code, if I use the Bokeh backend then it plots no issue:
N.B. The "atts" used above are:
However, if I use the Plotly backend then I get a bunch of warnings and no output:
I need my boxplots to be interactive so I need to use the Plotly backend.
Thanks
Output of conda_list command:
I am using OSX 10.15.5 and Firefox 77.0.1