def _apply_compositor(self, holomap, ranges=None, keys=None, dimensions=None):
        """
        Given a HoloMap compute the appropriate (mapwise or framewise)
        ranges in order to apply the Compositor collapse operations in
        display mode (data collapse should already have happened).
        """
        # Compute framewise normalization
        defaultdim = holomap.ndims == 1 and holomap.kdims[0].name != 'Frame'

        if keys and ranges and dimensions and not defaultdim:
            dim_inds = [dimensions.index(d) for d in holomap.kdims]
            sliced_keys = [tuple(k[i] for i in dim_inds) for k in keys]
            frame_ranges = OrderedDict([(slckey, self.compute_ranges(holomap, key, ranges[key]))
                                        for key, slckey in zip(keys, sliced_keys) if slckey in holomap.data.keys()])
        else:
            mapwise_ranges = self.compute_ranges(holomap, None, None)
            frame_ranges = OrderedDict([(key, self.compute_ranges(holomap, key, mapwise_ranges))
                                        for key in holomap.data.keys()])
        ranges = frame_ranges.values()

        return Compositor.collapse(holomap, (ranges, frame_ranges.keys()), mode='display')
def _apply_compositor ( self , holomap , ranges = None , keys = None , dimensions = None ) : defaultdim = holomap . ndims == 1 and holomap . kdims [ 0 ] . name != 'Frame' if keys and ranges and dimensions and not defaultdim : dim_inds = [ dimensions . index ( d ) for d in holomap . kdims ] sliced_keys = [ tuple ( k [ i ] for i in dim_inds ) for k in keys ] frame_ranges = OrderedDict ( [ ( slckey , self . compute_ranges ( holomap , key , ranges [ key ] ) ) for key , slckey in zip ( keys , sliced_keys ) if slckey in holomap . data . keys ( ) ] ) else : mapwise_ranges = self . compute_ranges ( holomap , None , None ) frame_ranges = OrderedDict ( [ ( key , self . compute_ranges ( holomap , key , mapwise_ranges ) ) for key in holomap . data . keys ( ) ] ) ranges = frame_ranges . values ( ) return Compositor . collapse ( holomap , ( ranges , frame_ranges . keys ( ) ) , mode = 'display' )
Given a HoloMap compute the appropriate (mapwise or framewise)
        ranges in order to apply the Compositor collapse operations in
        display mode (data collapse should already have happened).