本文整理汇总了Python中holoviews.core.options.Store.register方法的典型用法代码示例。如果您正苦于以下问题:Python Store.register方法的具体用法?Python Store.register怎么用?Python Store.register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类holoviews.core.options.Store
的用法示例。
在下文中一共展示了Store.register方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: situated
# 需要导入模块: from holoviews.core.options import Store [as 别名]
# 或者: from holoviews.core.options.Store import register [as 别名]
The situated bounds can be set to embed the CFView in a larger
bounded region.""")
input_sheet_slice = param.NumericTuple(default=(0, 0, 0, 0), doc="""
Slice indices of the embedded view into the situated matrix.""")
@property
def situated(self):
if self.bounds.lbrt() == self.situated_bounds.lbrt():
self.warning("CFView is already situated.")
return self
l, b, r, t = self.bounds.lbrt()
xd = int(np.round(self.data.shape[1] / (r-l)))
yd = int(np.round(self.data.shape[0] / (t-b)))
scs = SheetCoordinateSystem(self.situated_bounds, xd, yd)
data = np.zeros(scs.shape, dtype=np.float64)
r1, r2, c1, c2 = self.input_sheet_slice
data[r1:r2, c1:c2] = self.data
return CFView(data, self.situated_bounds, roi_bounds=self.bounds,
situated_bounds=self.situated_bounds,
label=self.label, group=self.group)
Store.register({CFView: RasterPlot}, 'matplotlib')
options = Store.options(backend='matplotlib')
options.CFView = Options('style', cmap='gray', interpolation='nearest')