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?