title: Pan and zoom in pyplot are very slow
body: <p>I'm making visualizations for a machine learning project that I'm working on and I'm using matplotlib for the plots. The backend for matplotlib is Qt4Agg. The amount of points plotted is less than 100.</p>
  
  <p>The pan and zoom are veery slow. Do you know what could the reason for this?</p>
  
  <pre><code>import numpy as np
  from mpl_toolkits.mplot3d import Axes3D
  import matplotlib.pyplot as plt
  
  from classifier import Classifier
  
  cl = Classifier(1)
  with open("./data/enolase-01.bounds") as file:
      data = file.read().strip().split("\n")
      xdim = int(data[7].split(" ")[-1])
      ydim = int(data[8].split(" ")[-1])
      zdim = int(data[9].split(" ")[-1])
  
  fig = plt.figure()
  ax = fig.add_subplot(111, projection="3d")
  
  for i, n in enumerate(cl.X[0]):
      z = i % zdim
      y = i / zdim % ydim
      x = i / zdim / ydim % xdim
      if n == 0.0:
          continue
      ax.scatter([x], [y], [z], c='r', marker="o")
      #print x, y, z
  
  
  ax.set_xlabel('X Label')
  ax.set_ylabel('Y Label')
  ax.set_zlabel('Z Label')
  
  plt.show()
  </code></pre>