I've noticed some odd behavior in the mplot3d toolkit when using
scatter3D with plot_surface. What I want to do is generate the
surface with an alpha level of 0.5, such that any points that are
between me and the surface should come out fully opaque, and any
points behind the surface should be rendered blended with the surface.
Instead, the scattered points are blended with the surface regardless
of whether they are in front of it or behind. There's also a weird
behavior where, depending on the viewing angle, the points will
suddenly snap from fully opaque (even if behind the surface) to
transparent. An example is attached, with renderings of the two
states in the URLs below.
Is this a bug, or am I doing something wrong?
http://dl.dropbox.com/u/8683962/mpl3dalpha-1.png
http://dl.dropbox.com/u/8683962/mpl3dalpha-2.png
--
Erik Tollerud
#!/usr/bin/env python
from numpy.random import randn,rand
from numpy import mgrid
from matplotlib.pyplot import show,gcf
from mpl_toolkits.mplot3d import Axes3D
ax=Axes3D(gcf())
x,y=mgrid[-1:1:25j,-1:1:25j]
z=x**2*.5*y**2
xp,yp=randn(2,100)/2
zp=rand(100)/2
ax.plot_surface(x,y,z,alpha=0.5)
ax.scatter3D(xp,yp,zp,c='r')
show()
------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users