(self, pos: QPointF)
return i, j
Return the cell row, column from `pos` in local coordinates.
Return the cell row, column from `pos` in local coordinates.
Return the cell row column from pos in local coordinates .
def heatmapCellAt(self, pos: QPointF) -> Tuple[int, int]:
        """Return the cell row, column from `pos` in local coordinates.
        """
        if self.__pixmap.isNull() or not \
                self.__pixmapItem.geometry().contains(pos):
            return -1, -1
        assert self.__data is not None
        item_clicked = self.__pixmapItem
        pos = self.mapToItem(item_clicked, pos)
        size = self.__pixmapItem.size()

        x, y = pos.x(), pos.y()

        N, M = self.__data.shape
        fx = x / size.width()
        fy = y / size.height()
        i = min(int(math.floor(fy * N)), N - 1)
        j = min(int(math.floor(fx * M)), M - 1)
        return i, j
def heatmapCellAt ( self , pos : QPointF ) -> Tuple [ int , int ] : if self . __pixmap . isNull ( ) or not self . __pixmapItem . geometry ( ) . contains ( pos ) : return - 1 , - 1 assert self . __data is not None item_clicked = self . __pixmapItem pos = self . mapToItem ( item_clicked , pos ) size = self . __pixmapItem . size ( ) x , y = pos . x ( ) , pos . y ( ) N , M = self . __data . shape fx = x / size . width ( ) fy = y / size . height ( ) i = min ( int ( math . floor ( fy * N ) ) , N - 1 ) j = min ( int ( math . floor ( fx * M ) ) , M - 1 ) return i , j