def set(self, U, ind):
    for (l, u) in zip(self.lines, U):
        if (self.codim == 1):
            if self.periodic:
                l.set_ydata(np.concatenate((u[ind], [u[ind][0]])))
            else:
                l.set_ydata(u[ind])
        else:
            l.set_ydata(np.repeat(u[ind], 2))
    self.draw()
def set(self, U, ind):
    for (l, u) in zip(self.lines, U):
        if (self.codim == 1):
            if self.periodic:
                l.set_ydata(np.concatenate((u[ind], [u[ind][0]])))
            else:
                l.set_ydata(u[ind])
        else:
            l.set_ydata(np.repeat(u[ind], 2))
    self.draw()