function_plotting_py.ipynb
xxxxxxxxxx
import numpy as np,pylab as pl
from mpl_toolkits.mplot3d import Axes3D
x,y,z=np.indices((13,13,13))
link=(x-6)**2+(y-5)**2+(z-6)**2==45
fig = pl.figure()
ax = fig.add_subplot(111, projection='3d')
ax.voxels(link,facecolors=pl.cm.bwr((x+y+x)*8),
edgecolor='darkslategray')
ti='$(x-6)^2+(y-5)^2+(z-6)^2=45}$'
pl.title(ti,fontsize=14,color='#3636ff')
pl.tight_layout(); pl.show()
No comments:
Post a Comment