On Sat, Feb 19, 2011 at 10:25:17PM +0000, Michele Mattioni wrote:
> I think I've got the majority of things properly up, however I'm
> trying to figure out how to add the colorbar
> https://gist.github.com/829727#file_example.py

> I didn't find which object I should pass to the scalarbar function.

The 'surf' object that you created. Pass it after adding the scalars, at
the end of your script.

> However the outline seems to add app, together with a general outline
> which wrap everything is drawn.

Indeed, one trick in the example I gave you is that the cylinders are
combined together in one object. This is done to help scaling up to many
cylinders, but it does mean that a single cylinder cannot be accessed as
an individual object.

That's not big deal, it's the same problem if you use glyphs, as in the
following example:
http://github.enthought.com/mayavi/mayavi/auto/example_select_red_balls.html

> I think it should be easy to fix, I just need to pass the object I
> want to colour and display one outline per time.

> What I'm missing?

You can't pass such object, because it does not exist for Mayavi.

What you need to do, is to work as in the 'select red balls' example, and
from the picker find which cylinder you are Selecting, and use this
information to position the outline there. You can also use this
information to change the value of the scalars corresponding to this
cylinder and it will change its color.

HTH,

Gael

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to