from topo.base.projection import Projection from topo.base.sheet import Sheet from topo.base.sheetview import CFView from topo.misc.ipython import RunProgress from topo.misc import color from command import measure_cog CoG_spec = "Image.X CoG * Image.Y CoG * Image.BlueChannel" XYCoG = chain.instance( group='XYCoG', name='XYCoG', operations=[image_overlay.instance(spec=CoG_spec), factory.instance()]) Compositor.register( Compositor("Image.X CoG * Image.Y CoG", XYCoG, 'XYCoG', 'display')) import param from holoviews import RGB, ElementOperation from holoviews.operation.normalization import raster_normalization class colorizeHSV(ElementOperation): """ Given an Overlay consisting of two Image elements, colorize the data in the bottom Image with the data in the top Image using the HSV color space. """ group = param.String(default='ColorizedHSV', doc="""
""" Applies hex binning by computing aggregates on a hexagonal grid. Should not be user facing as the returned element is not directly useable. """ def _process(self, element, key=None): if isinstance(element, HexTiles): element = project_points._process(self, element) return hex_binning._process(self, element) compositor = Compositor("HexTiles", geo_hex_binning, None, 'data', output_type=HexTiles, transfer_options=True, transfer_parameters=True, backends=['bokeh']) Compositor.register(compositor) Store.register( { WMTS: TilePlot, Points: GeoPointPlot, Labels: GeoLabelsPlot, VectorField: GeoVectorFieldPlot, Polygons: GeoPolygonPlot, Contours: GeoContourPlot, Rectangles: GeoRectanglesPlot, Segments: GeoSegmentsPlot,
from holoviews.operation import gridmatrix from .operation import regression from holoviews.plotting.bokeh import CurvePlot #unsure if necessary? class Regression(hv.Curve): group = param.String(default='Regression') class RegressionPlot(CurvePlot): """ RegressionPlot visualizes a distribution of values as a trend in time. """ Compositor.register( Compositor("Regression", regression, None, 'data', transfer_options=True, transfer_parameters=True, output_type=hv.Curve, backends=['bokeh', 'matplotlib'])) hv.Store.register({Regression: RegressionPlot}, 'bokeh') hv.Store.set_current_backend('bokeh')
_load_mpl() else: try: from . import mpl # noqa except ImportError: pass try: from . import bokeh # noqa except ImportError: pass Compositor.register( Compositor("LineContours", contours, None, 'data', transfer_options=True, transfer_parameters=True, output_type=Contours, backends=['bokeh', 'matplotlib'])) Compositor.register( Compositor("FilledContours", contours.instance(filled=True), None, 'data', transfer_options=True, transfer_parameters=True, output_type=Polygons, backends=['bokeh', 'matplotlib']))