How to use the hvplot.xarray.register_dataset_accessor function in hvplot

To help you get started, we’ve selected a few hvplot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github holoviz / hvplot / hvplot / xarray.py View on Github external
def patch(name='hvplot', extension='bokeh', logo=False):
    from . import hvPlot, post_patch

    try:
        import xarray as xr
    except:
        raise ImportError('Could not patch plotting API onto xarray. '
                          'xarray could not be imported.')

    xr.register_dataset_accessor(name)(hvPlot)
    xr.register_dataarray_accessor(name)(hvPlot)

    post_patch(extension, logo)