0
import numpy as np
 X,Y,Z = np.mgrid[0:50,0:50,0:50] 
import matplotlib.pyplot as plt
fig = plt.figure()
ax = plt.axes(projection='3d')
ax.scatter(X,Y,Z)

I am trying to rotate this MGRID (numpy "not a meshgrid") by some angle around x, y or z axis. What could be the best way of doing it?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
  • Does this answer your question? [Numpy einsum() for rotation of meshgrid](https://stackoverflow.com/questions/31816754/numpy-einsum-for-rotation-of-meshgrid) – DrBwts Jun 05 '21 at 10:37
  • Thanks for reaching out.. Yes tried it .. but couldn't do it for mgrid as this is for meshgrid.. if you tried please do share – Ammar Jun 05 '21 at 12:15

0 Answers0