def format_coord(self, x, y): normal_part = Axes.format_coord(self, x, y) if self.images: # Most recent image is usually on top im = self.images[-1] j, i = self._coords2index(im, x, y) z = im.get_array()[j, i] return "Value: %f, %s" % (z, normal_part) return normal_part