-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
surf(x,y,z,c) function? #264
Comments
Have you tried
See also #91. |
Thanks a lot, Steven. m=32
r = (0:m)''/m
theta = reshape(pi*(-m:m)/m, 1, 2*m+1)
z = r * exp(im*theta)
plot_surface(real(z), imag(z), real(z.^3), rstride=1, cstride=1, facecolors=imag(z.^3), antialiased=true) Just in case, |
Steven: |
If I normalize the supplied array ranging from 0.0 to 1.0, it seems that the full range of the colormap is used. Am I correct? In my example, tmp=imag(z.^3); tmp=(tmp-minimum(tmp))/(maximum(tmp)-minimum(tmp))
plot_surface(real(z),imag(z), real(z.^3),rstride=1, cstride=1, facecolors=viri(tmp)) The normalization via |
I think that's correct, but you would have to check with matplotlib to be sure. |
I am wondering if we can plot a 3D surface with its surface color shading specified by an input array
c
. Currently, the surface color is proportional to the heightz
. Many people want to display the color specified by another arrayc
on top of the 3D surfaces specified by the coordinatesx, y, z
. Apparently, it is possible to do this usingmatplotlib
directly, but I definitely want to stay withPyPlot
level functions rather than directly usingmatplotlib
. Here is the link to the direct use ofmatplotlib
to dosurf(x,y,z,c)
like MATLAB: http://stackoverflow.com/questions/22175533/what-is-the-equivalent-of-matlabs-surfx-y-z-c-in-matplotlibThanks for your help!
BVPs
The text was updated successfully, but these errors were encountered: