title: ValueError: x and y must be equal-length 1D arrays
body: <p>I run the following code to animate a moving sphere, in which the coordinates are in a text file:</p>
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  from mpl_toolkits import mplot3d
  from matplotlib import cm
  from matplotlib import animation
  import pandas as pd
  
  df = pd.read_csv('/path/to/text/file', sep=&quot; &quot;, header=None)
  
  fig = plt.figure(facecolor='black')
  ax = plt.axes(projection = &quot;3d&quot;)
  
  u = np.linspace(0, 2*np.pi, 100)
  v = np.linspace(0, np.pi, 100)
  r = 4
  
  ax.set_xlim(0, 60)
  ax.set_ylim(0, 60)
  ax.set_zlim(0, 60)
  
  x0 = r * np.outer(np.cos(u), np.sin(v)) + df[1][0]
  y0 = r * np.outer(np.sin(u), np.sin(v)) + df[2][0]
  z0 = r * np.outer(np.ones(np.size(u)), np.cos(v)) + df[3][0]
  
  surface_color = &quot;tab:blue&quot;
  
  def init():
      ax.plot_trisurf(x0, y0, z0, linewidth=0, antialiased=False)
      return fig,
  
  def animate(i):
      # remove previous collections
      ax.collections.clear()
      x = df[1][i]
      y = df[2][i]
      z = df[3][i]
      # add the new sphere
      ax.plot_trisurf(x, y, z, linewidth=0, antialiased=False)
      return fig,
  
  ani = animation. FuncAnimation(fig, animate, init_func = init, frames = 500, interval = 2)
  plt.show()
  </code></pre>
  <p>I get the following error &quot;ValueError: x and y must be equal-length 1D arrays&quot; even though I'm sure the arrays are of equal size. How do I make them equal size and solve this error?</p>
  <p>As a sample of whats in the file:</p>
  <pre><code>0.196812 19.992262 29.989437 30.040883 0.080273 39.999358 30.009271 30.052325 
  0.288626 19.998165 29.986778 30.083568 0.305931 39.993330 30.011351 30.126911 
  0.080401 20.012453 29.982994 30.138681 0.224338 39.986476 30.010048 30.204666 
  0.380893 20.017042 29.984149 30.196864 0.289713 39.984835 30.009015 30.285159 
  0.396571 20.009539 29.998625 30.259610 0.350441 39.993791 30.017738 30.361558 
  0.647959 20.012771 29.995641 30.328414 0.275493 39.992826 30.019380 30.433242 
  0.741711 20.000002 29.978545 30.397738 0.248958 39.992041 30.010427 30.508367 
  0.867323 19.991656 29.971294 30.464908 0.313612 39.999097 30.004667 30.591674
  </code></pre>
  <p>The text file is very large, around 20,000 lines.</p>