def plot_coord(self, index, gate_width):
    h_pos = ((index % self.__fold) + 1)
    if (self.__fold > 0):
        if ((h_pos + (gate_width - 1)) > self.__fold):
            index += (self.__fold - (h_pos - 1))
        x_pos = (((index % self.__fold) + 1) + (0.5 * (gate_width - 1)))
        y_pos = (self.__yind - ((index // self.__fold) * (self.__reg_num + 1)))
    else:
        x_pos = ((index + 1) + (0.5 * (gate_width - 1)))
        y_pos = self.__yind
    return (x_pos, y_pos)
def plot_coord(self, index, gate_width):
    h_pos = ((index % self.__fold) + 1)
    if (self.__fold > 0):
        if ((h_pos + (gate_width - 1)) > self.__fold):
            index += (self.__fold - (h_pos - 1))
        x_pos = (((index % self.__fold) + 1) + (0.5 * (gate_width - 1)))
        y_pos = (self.__yind - ((index // self.__fold) * (self.__reg_num + 1)))
    else:
        x_pos = ((index + 1) + (0.5 * (gate_width - 1)))
        y_pos = self.__yind
    return (x_pos, y_pos)