def _set(self, u, i):
    if (self.codim == 1):
        if self.periodic:
            self.lines[i].set_ydata(np.concatenate((u, [self.U[0]])))
        else:
            self.lines[i].set_ydata(u)
    else:
        self.lines[i].set_ydata(np.repeat(u, 2))
def _set(self, u, i):
    if (self.codim == 1):
        if self.periodic:
            self.lines[i].set_ydata(np.concatenate((u, [self.U[0]])))
        else:
            self.lines[i].set_ydata(u)
    else:
        self.lines[i].set_ydata(np.repeat(u, 2))