def _redraw_labels(self):
        """Redraw axis labels, typically after draw or resize events."""
        ax = self.get_axes()
        # Remove any previous labels
        for mpl_object in self._to_remove:
            mpl_object.remove()
        self._to_remove = []
        # Redraw the labels with the appropriate angles
        label_data = list(self._labels.values())
        label_data.extend(self._corner_labels.values())
        for (label, position, rotation, kwargs) in label_data:
            transform = ax.transAxes
            x, y = project_point(position)
            # Calculate the new angle.
            position = numpy.array([x, y])
            new_rotation = ax.transData.transform_angles(
                numpy.array((rotation,)), position.reshape((1, 2)))[0]
            text = ax.text(x, y, label, rotation=new_rotation,
                           transform=transform, horizontalalignment="center",
                           **kwargs)
            text.set_rotation_mode("anchor")
            self._to_remove.append(text)
Redraw axis labels, typically after draw or resize events.