(self, label, cutidx, inc)
This function set the location of the text label around the selected
        point at the curve. It place the text such that it is not plotted
        at the line.

        Parameters
        ----------
        label : TextItem
            Text item that needs to have location set.
        cutidx : int
            The index of the selected element in the list. If index in first
            part of the list we put label on the right side else on the left,
            such that it does not disappear at the graph edge.
        inc : bool
            This parameter tels whether the curve value is increasing or
            decreasing.
This function set the location of the text label around the selected
        point at the curve. It place the text such that it is not plotted
        at the line.
This function set the location of the text label around the selected point at the curve . It place the text such that it is not plotted at the line .
def _set_anchor(self, label, cutidx, inc):
        """
        This function set the location of the text label around the selected
        point at the curve. It place the text such that it is not plotted
        at the line.

        Parameters
        ----------
        label : TextItem
            Text item that needs to have location set.
        cutidx : int
            The index of the selected element in the list. If index in first
            part of the list we put label on the right side else on the left,
            such that it does not disappear at the graph edge.
        inc : bool
            This parameter tels whether the curve value is increasing or
            decreasing.
        """
        if inc:
            label.anchor = Point(0, 0) if cutidx < len(self.x) / 2 \
                else Point(1, 1)
        else:
            label.anchor = Point(0, 1) if cutidx < len(self.x) / 2 \
                else Point(1, 0)
def _set_anchor ( self , label , cutidx , inc ) : if inc : label . anchor = Point ( 0 , 0 ) if cutidx < len ( self . x ) / 2 else Point ( 1 , 1 ) else : label . anchor = Point ( 0 , 1 ) if cutidx < len ( self . x ) / 2 else Point ( 1 , 0 )