You can clone with
HTTPS or Subversion.
Original report at SourceForge, opened Fri Oct 22 10:15:01 2010
I am trying to create a 3D matplotlib scatter plot as an imagemap for a web page, where the scatter points are clickable using an map.
A variant on the code below works wonderfully for normal 2D plots but I cannot get it to work with an Axes3D and (3D) scatter diagram. What am I doing wrong (I assume I need to use proj3d.transform differently)?
axes = Axes3D(self.figure,azim=azim,elev=elev)
ys = np.random.rand(100)
xs = np.random.rand(100)
zs = np.random.rand(100)
s=self.axes.scatter(xs, ys, zs)
dpi = self.figure.get_dpi()
height = self.figure.get_figheight() * dpi
x1,y1,z1= proj3d.transform(xs, ys, zs,axes.get_proj())
xys = zip(x1,y1)
transformed_xys = self.s.get_transform().transform(xys)
### transformed_xys to contain the x,y coords of the points
# (need to do height - y for the image-map)
... output as imagemap
@weathergod, can this be closed?