當前位置: 首頁>>代碼示例>>Python>>正文


Python Store.options方法代碼示例

本文整理匯總了Python中holoviews.core.options.Store.options方法的典型用法代碼示例。如果您正苦於以下問題:Python Store.options方法的具體用法?Python Store.options怎麽用?Python Store.options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在holoviews.core.options.Store的用法示例。


在下文中一共展示了Store.options方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _set_style

# 需要導入模塊: from holoviews.core.options import Store [as 別名]
# 或者: from holoviews.core.options.Store import options [as 別名]
 def _set_style(self, feature, map_type):
     fname = feature.name.capitalize()
     style_path = ('Image', fname + map_type.capitalize())
     options = Store.options(backend='matplotlib')
     if style_path not in options.data:
         cyclic = True if feature.cyclic and not map_type == 'selectivity' else False
         options[style_path] = Options('style', **(dict(cmap='hsv') if cyclic else dict()))
開發者ID:ioam,項目名稱:featuremapper,代碼行數:9,代碼來源:__init__.py

示例2: option_intersections

# 需要導入模塊: from holoviews.core.options import Store [as 別名]
# 或者: from holoviews.core.options.Store import options [as 別名]
def option_intersections(backend):
    intersections = []
    options = Store.options(backend)
    for k, opts in sorted(options.items()):
        if len(k) > 1: continue
        valid_options = {k: set(o.allowed_keywords)
                         for k, o in opts.groups.items()}
        for g1, g2 in combinations(Options._option_groups, 2):
            intersection = valid_options[g1] & valid_options[g2]
            if intersection:
                intersections.append((k, intersection))
    return intersections
開發者ID:basnijholt,項目名稱:holoviews,代碼行數:14,代碼來源:__init__.py

示例3: Options

# 需要導入模塊: from holoviews.core.options import Store [as 別名]
# 或者: from holoviews.core.options.Store import options [as 別名]
        for (in_label, out_label), view in grids.items():
            results.set_path(('%s_Reverse_Correlation' % in_label, out_label), view)
            if p.store_responses:
                info = (p.pattern_generator.__class__.__name__,
                        pattern_dim_label, 'Response')
                results.set_path(('%s_%s_%s' % info, in_label),
                                 responses[in_label])
                results.set_path(('%s_%s_%s' % info, out_label),
                                 responses[out_label])
        return results

from holoviews.core.options import Compositor
from .analysis import toHCS

#Default styles
options = Store.options(backend='matplotlib')
options.Image.Preference = Options('style', cmap='hsv')
options.Image.Selectivity = Options('style', cmap='gray')
options.Image.Activity = Options('style', cmap='gray')
options.Image.Response = Options('style', cmap='gray')
options.Image.FFT_Power = Options('style', cmap='gray')

# Default channel definitions
Compositor.register(
    Compositor('Image.Orientation_Preference * Image.Orientation_Selectivity',
               toHCS, 'OR PrefSel', mode='display', flipSC=True))

Compositor.register(
    Compositor('Image.Direction_Preference * Image.Direction_Selectivity',
               toHCS, 'DR PrefSel', mode='display', flipSC=True))
開發者ID:ioam,項目名稱:featuremapper,代碼行數:32,代碼來源:__init__.py

示例4: range

# 需要導入模塊: from holoviews.core.options import Store [as 別名]
# 或者: from holoviews.core.options.Store import options [as 別名]
        for vind in range(vlines)[:: p.stride]:
            lines.append(np.vstack([xsv.data[:, vind].T, ysv.data[:, vind]]).T)
        cogmesh = Contours(lines, extents=sheet.bounds.lbrt(), label=proj.name, group="Center of Gravity")

        xcog_map = HoloMap((timestamp, xsv), kdims=[features.Time])
        xcog_map.metadata = metadata
        ycog_map = HoloMap((timestamp, ysv), kdims=[features.Time])
        ycog_map.metadata = metadata

        contour_map = HoloMap((timestamp, cogmesh), kdims=[features.Time])
        contour_map.metadata = metadata

        return {"XCoG": xcog_map, "YCoG": ycog_map, "CoG": contour_map}


options = Store.options(backend="matplotlib")
options.Contours.Gravity = Options("style", linewidth=1.0)
options.Image.X_CoG = Options("style", cmap="gray")
options.Image.Y_CoG = Options("style", cmap="gray")
options.CFView.OnOff_CFs = Options("style", cmap="RdYlBu_r", interpolation="nearest")

import types

__all__ = list(
    set(
        [
            k
            for k, v in locals().items()
            if isinstance(v, types.FunctionType)
            or (isinstance(v, type) and issubclass(v, ParameterizedFunction))
            and not v.__name__.startswith("_")
開發者ID:zdx3578,項目名稱:topographica,代碼行數:33,代碼來源:command.py


注:本文中的holoviews.core.options.Store.options方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。