当前位置: 首页>>代码示例>>Python>>正文


Python holoviews.extension方法代码示例

本文整理汇总了Python中holoviews.extension方法的典型用法代码示例。如果您正苦于以下问题:Python holoviews.extension方法的具体用法?Python holoviews.extension怎么用?Python holoviews.extension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在holoviews的用法示例。


在下文中一共展示了holoviews.extension方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: output_notebook

# 需要导入模块: import holoviews [as 别名]
# 或者: from holoviews import extension [as 别名]
def output_notebook(inline=True, logo=False):
    """
    Load the notebook extension

    Parameters
    ----------
    inline : boolean (optional)
        Whether to inline JS code or load it from a CDN
    logo : boolean (optional)
        Whether to show the logo(s)
    """
    try:
        import hvplot
    except ImportError:
        raise ImportError("The intake plotting API requires hvplot."
                          "hvplot may be installed with:\n\n"
                          "`conda install -c pyviz hvplot` or "
                          "`pip install hvplot`.")
    import holoviews as hv
    return hv.extension('bokeh', inline=inline, logo=logo) 
开发者ID:intake,项目名称:intake,代码行数:22,代码来源:__init__.py

示例2: swarm

# 需要导入模块: import holoviews [as 别名]
# 或者: from holoviews import extension [as 别名]
def swarm(request):
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", category=DeprecationWarning)
        swarm_name, backend = request.param
        holoviews.extension(backend)
        swarm_viz = swarm_dict.get(swarm_name)()
        PLOTS[request.param] = swarm_viz.plot()
        return swarm_viz 
开发者ID:FragileTech,项目名称:fragile,代码行数:10,代码来源:test_swarm_viz.py

示例3: plot_saver

# 需要导入模块: import holoviews [as 别名]
# 或者: from holoviews import extension [as 别名]
def plot_saver(request):
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", category=DeprecationWarning)
        swarm_name, backend = request.param
        holoviews.extension(backend)
        swarm_viz = swarm_dict.get(swarm_name)()
        swarm_viz.stream_interval = 1
        plot_saver = PlotSaver(swarm_viz, output_path="Miau_db", fmt="png")
        return plot_saver 
开发者ID:FragileTech,项目名称:fragile,代码行数:11,代码来源:test_plot_saver.py

示例4: test_get_file_name

# 需要导入模块: import holoviews [as 别名]
# 或者: from holoviews import extension [as 别名]
def test_get_file_name(self, plot_saver):
        with warnings.catch_warnings():
            warnings.filterwarnings("ignore", category=DeprecationWarning)
            filename = plot_saver._get_file_name()
            assert isinstance(filename, str)
            name, extension = filename.split(".")
            assert extension == plot_saver._fmt
            class_name, epoch = name.split("_")
            assert class_name == plot_saver.unwrapped.__class__.__name__.lower()
            assert len(epoch) == 5
            assert int(epoch) == plot_saver.epoch 
开发者ID:FragileTech,项目名称:fragile,代码行数:13,代码来源:test_plot_saver.py

示例5: with_hv_extension

# 需要导入模块: import holoviews [as 别名]
# 或者: from holoviews import extension [as 别名]
def with_hv_extension(func, extension='bokeh', logo=False):
    """If hv.extension is not loaded, load before calling function"""
    def wrapper(*args, **kwargs):
        if extension and not getattr(hv.extension, '_loaded', False):
            hv.extension(extension, logo=logo)
        return func(*args, **kwargs)
    return wrapper 
开发者ID:holoviz,项目名称:hvplot,代码行数:9,代码来源:util.py

示例6: post_patch

# 需要导入模块: import holoviews [as 别名]
# 或者: from holoviews import extension [as 别名]
def post_patch(extension='bokeh', logo=False):
    if extension and not getattr(_hv.extension, '_loaded', False):
        _hv.extension(extension, logo=logo) 
开发者ID:holoviz,项目名称:hvplot,代码行数:5,代码来源:__init__.py

示例7: setUp

# 需要导入模块: import holoviews [as 别名]
# 或者: from holoviews import extension [as 别名]
def setUp(self):
        try:
            import pandas as pd
        except:
            raise SkipTest('Pandas not available')
        self.backend = 'bokeh'
        hv.extension(self.backend)
        Store.current_backend = self.backend
        self.store_copy = OptionTree(sorted(Store.options().items()),
                                     groups=Options._option_groups)
        import hvplot.pandas   # noqa
        self.df = pd.DataFrame([[1, 2, 'A', 0.1], [3, 4, 'B', 0.2], [5, 6, 'C', 0.3]],
                               columns=['x', 'y', 'category', 'number'])
        self.symmetric_df = pd.DataFrame([[1, 2, -1], [3, 4, 0], [5, 6, 1]],
                                          columns=['x', 'y', 'number']) 
开发者ID:holoviz,项目名称:hvplot,代码行数:17,代码来源:testoptions.py


注:本文中的holoviews.extension方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。