Revision: 8197
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8197&view=rev
Author:   heeres
Date:     2010-03-19 16:49:29 +0000 (Fri, 19 Mar 2010)

Log Message:
-----------
Add 3d surface plot example (radial coordinates)

Added Paths:
-----------
    branches/v0_99_maint/examples/mplot3d/surface3d_radial_demo.py

Added: branches/v0_99_maint/examples/mplot3d/surface3d_radial_demo.py
===================================================================
--- branches/v0_99_maint/examples/mplot3d/surface3d_radial_demo.py              
                (rev 0)
+++ branches/v0_99_maint/examples/mplot3d/surface3d_radial_demo.py      
2010-03-19 16:49:29 UTC (rev 8197)
@@ -0,0 +1,27 @@
+# By Armin Moser
+
+from mpl_toolkits.mplot3d import Axes3D
+import matplotlib
+import numpy as np
+from matplotlib import cm
+from matplotlib import pyplot as plt
+step = 0.04
+maxval = 1.0
+fig = plt.figure()
+ax = Axes3D(fig)
+
+# create supporting points in polar coordinates
+r = np.linspace(0,1.25,50)
+p = np.linspace(0,2*np.pi,50)
+R,P = np.meshgrid(r,p)
+# transform them to cartesian system
+X,Y = R*np.cos(P),R*np.sin(P)
+
+Z = ((R**2 - 1)**2)
+ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet)
+ax.set_zlim3d(0, 1)
+ax.set_xlabel(r'$\phi_\mathrm{real}$')
+ax.set_ylabel(r'$\phi_\mathrm{im}$')
+ax.set_zlabel(r'$V(\phi)$')
+ax.set_xticks([])
+plt.show()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to