'Calculate mouse coordinates in physical pixels
Qt5 use logical pixels, but the figure is scaled to physical
pixels for rendering.   Transform to physical pixels so that
all of the down-stream transforms work as expected.
Also, the origin is different and needs to be corrected.'

def mouseEventCoords(self, pos):

    dpi_ratio = self._dpi_ratio
    x = pos.x()
    y = ((self.figure.bbox.height / dpi_ratio) - pos.y())
    return ((x * dpi_ratio), (y * dpi_ratio))
