Guest User

Untitled

a guest
Jul 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. import matplotlib.pyplot as plt
  4. from mpl_toolkits.mplot3d import axes3d, Axes3D #<-- Note the capitalization!
  5.  
  6. if __name__=='__main__':
  7. xx=yy=np.linspace(0,50,51)
  8. x,y=np.meshgrid(xx,yy)
  9. # z=np.minimum(x,y)/np.log(np.exp(1)+abs(x-y))
  10. z=np.minimum(x,y)/(np.exp(1)+abs(x-y))
  11.  
  12. from mpl_toolkits.mplot3d import Axes3D
  13. fig=plt.figure()
  14. ax=Axes3D(fig)
  15. ax.plot_wireframe(x,y,z,rstride=1,cstride=1,alpha=0.5)
  16. ax.set_xlabel('+ votes')
  17. ax.set_ylabel('- votes')
  18. ax.set_zlabel('controversy')
  19.  
  20. plt.show()
Add Comment
Please, Sign In to add comment