ValueError: 'vertices' must be a 2D list or array with shape Nx2 ValueError: 'vertices' must be a 2D list or array with shape Nx2 pandas pandas

ValueError: 'vertices' must be a 2D list or array with shape Nx2


The error message should give you all the hints you need. Removing the redundant brackets in your set_offsets() calls does the trick:

def animate(i) :    scatter_A.set_offsets([[XA[0+i][0], YA[0+i][0]], [XA[0+i][1], YA[0+i][1]], [XA[0+i][2], YA[0+i][2]], [XA[0+i][3], YA[0+i][3]], [XA[0+i][4], YA[0+i][4]],[XA[0+i][5], YA[0+i][5]], [XA[0+i][6], YA[0+i][6]], [XA[0+i][7], YA[0+i][7]], [XA[0+i][8], YA[0+i][8]], [XA[0+i][9], YA[0+i][9]], [XA[0+i][10], YA[0+i][10]], [XA[0+i][11], YA[0+i][11]], [XA[0+i][12], YA[0+i][12]], [XA[0+i][13], YA[0+i][13]], [XA[0+i][14], YA[0+i][14]]])    scatter_B.set_offsets([[XB[0+i][0], YB[0+i][0]], [XB[0+i][1], YB[0+i][1]], [XB[0+i][2], YB[0+i][2]], [XB[0+i][3], YB[0+i][3]], [XB[0+i][4], YB[0+i][4]],[XB[0+i][5], YB[0+i][5]], [XB[0+i][6], YB[0+i][6]], [XB[0+i][7], YB[0+i][7]], [XB[0+i][8], YB[0+i][8]], [XB[0+i][9], YB[0+i][9]], [XB[0+i][10], YB[0+i][10]], [XB[0+i][11], YB[0+i][11]], [XB[0+i][12], YB[0+i][12]], [XB[0+i][13], YB[0+i][13]], [XB[0+i][14], YB[0+i][14]]])    scatter_C.set_offsets([[XC[0+i][0], YC[0+i][0]]])

I'm surprised that your code worked before. Note that I'm not running exactly the same setup, I'm on macosx 10.13.5 with Python 3.6 installed through macports.