title: MatPlotLib rotate 3D plot around fixed axis
body: <p>I am trying to rotate the following figure around the vertical green axis drawn:</p>
  
  <p><img src="https://i.stack.imgur.com/RvA5T.jpg" alt="Rotate around vertical Green axis"></p>
  
  <p>However, I'm running into trouble trying to set the correct elevation and azimuthal values in order to correctly rotate my figure.</p>
  
  <p>For example, </p>
  
  <pre><code>    for i in range(0,360):
          axU.view_init(100-i,-90+i)
          plt.draw()
          plt.savefig('./gif1/rot%i.jpg'%i,dpi=100)   
  </code></pre>
  
  <p>gives me a figure like </p>
  
  <p><a href="https://imgur.com/b26d0V2" rel="nofollow noreferrer">http://imgur.com/b26d0V2</a></p>
  
  <p>and </p>
  
  <pre><code>    for i in range(0,360):
          axU.view_init(100,-90+i)
          plt.draw()
          plt.savefig('./gif1/rot%i.jpg'%i,dpi=100)   
  </code></pre>
  
  <p>looks something like:</p>
  
  <p><a href="https://imgur.com/3wdN8zT" rel="nofollow noreferrer">http://imgur.com/3wdN8zT</a></p>
  
  <p>both give me too much rotations around unwanted axes, where as I really just want to pan around the green axis drawn above. Is there any way to do this? </p>
  
  <pre><code>    for i in range(0,360):
          axU.view_init(100-i,-90)
          plt.draw()
          plt.savefig('./gif1/rot%i.jpg'%i,dpi=100)   
  </code></pre>
  
  <p>This give me something similar to what I want, where the rotation is uniform around one axis, but this rotates around the horizontal green axis whereas I would like it to rotate around the vertical green axis.</p>
  
  <p><a href="https://imgur.com/b4zeUiI" rel="nofollow noreferrer">rotation</a></p>
  
  <p><a href="https://imgur.com/b4zeUiI" rel="nofollow noreferrer">http://imgur.com/b4zeUiI</a></p>