(data, kind, **kwargs)
| 13 | |
| 14 | @with_hv_extension |
| 15 | def plot(data, kind, **kwargs): |
| 16 | # drop reuse_plot |
| 17 | kwargs.pop('reuse_plot', None) |
| 18 | |
| 19 | # replace with shared_axes |
| 20 | sharex = kwargs.pop('sharex', None) |
| 21 | sharey = kwargs.pop('sharey', None) |
| 22 | if sharex is not None and sharey is not None: |
| 23 | kwargs['shared_axes'] = sharex or sharey |
| 24 | elif sharex is not None: |
| 25 | kwargs['shared_axes'] = sharex |
| 26 | elif sharey is not None: |
| 27 | kwargs['shared_axes'] = sharey |
| 28 | |
| 29 | # drop all kwargs that are set to None |
| 30 | no_none_kwargs = {} |
| 31 | for k, v in kwargs.items(): |
| 32 | if v is not None: |
| 33 | no_none_kwargs[k] = v |
| 34 | |
| 35 | if is_polars(data): |
| 36 | from .core import hvPlotTabularPolars |
| 37 | |
| 38 | return hvPlotTabularPolars(data)(kind=kind, **no_none_kwargs) |
| 39 | |
| 40 | elif is_duckdb(data): |
| 41 | warnings.warn( |
| 42 | 'Allowing to pass DuckDB data objects to the plot function is ' |
| 43 | 'deprecated and will be removed in a future version. ' |
| 44 | 'Use `import hvplot.duckdb` instead.', |
| 45 | FutureWarning, |
| 46 | stacklevel=_find_stack_level(), |
| 47 | ) |
| 48 | from .core import hvPlotTabularDuckDB |
| 49 | |
| 50 | return hvPlotTabularDuckDB(data)(kind=kind, **no_none_kwargs) |
| 51 | return hvPlotTabular(data)(kind=kind, **no_none_kwargs) |
| 52 | |
| 53 | |
| 54 | def boxplot_series(*args, **kwargs): |
searching dependent graphs…