[mayavi] Glyph & TransformData issue...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[mayavi] Glyph & TransformData issue...

fred-2
Hi all,

I copied my CME from glyph.py.

When I play with the TransformData widget, it modifies spheres color &
radius...

Why?

Any hint?

Is it possible to not modify colors and radius?


TIA.

Cheers,

--
Fred

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

cme.py (1K) Download Attachment
snapshot1.png (130K) Download Attachment
snapshot2.png (164K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] Glyph & TransformData issue...

Gael Varoquaux
On Wed, Apr 07, 2010 at 11:10:58AM +0200, fred wrote:
> Hi all,
>
> I copied my CME from glyph.py.
>
> When I play with the TransformData widget, it modifies spheres color &  
> radius...

Hey Fred,

I just had a look at your problem, and it seems to me that the issue is
with the MaskPoints filter to which you pass 'random_mode=True'. Each
time you modify the data using the TransformData filter, the MaskPoints
is recalculated, and as it is randomly applied, you get a different
answer.

A simple workaround is to apply the MaskPoints filter before the
TransformData filter.

HTH,

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] Glyph & TransformData issue...

fred-2
Le 11/04/2010 21:37, Gael Varoquaux a écrit :

> On Wed, Apr 07, 2010 at 11:10:58AM +0200, fred wrote:
>> Hi all,
>>
>> I copied my CME from glyph.py.
>>
>> When I play with the TransformData widget, it modifies spheres color&
>> radius...
>
> Hey Fred,
>
> I just had a look at your problem, and it seems to me that the issue is
> with the MaskPoints filter to which you pass 'random_mode=True'. Each
> time you modify the data using the TransformData filter, the MaskPoints
> is recalculated, and as it is randomly applied, you get a different
> answer.
>
> A simple workaround is to apply the MaskPoints filter before the
> TransformData filter.
Good catch, Gaël!

But this is not my use-case, as I don't use the MaskPoints filter.


I have to try another CME showing my issue...



Cheers,

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] Glyph & TransformData issue...

fred-2
Le 12/04/2010 00:07, Fred a écrit :

> I have to try another CME showing my issue...
I get it.

It seems to be related to scale_factor trait.

If it equals to 1, no problem.

But in my use-case, it's not the case, so I get the issue...


TIA.



Cheers,

--
Fred

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

cme.py (1K) Download Attachment
snapshot.png (262K) Download Attachment
snapshot2.png (420K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] Glyph & TransformData issue...

fred-2
Le 12/04/2010 00:19, Fred a écrit :
> Le 12/04/2010 00:07, Fred a écrit :
>
>> I have to try another CME showing my issue...
> I get it.
>
> It seems to be related to scale_factor trait.
Hum, not really!

I tried with scale_factor set to 1 and get the same issue...


Cheers,

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] Glyph & TransformData issue...

Gael Varoquaux
In reply to this post by fred-2
On Mon, Apr 12, 2010 at 12:19:02AM +0200, Fred wrote:
> Le 12/04/2010 00:07, Fred a écrit :
>> I have to try another CME showing my issue...
> I get it.

I don't get the problem. I tried your example, but it seems to work fine.
What is it that you don't like?

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] Glyph & TransformData issue...

fred-2
Le 12/04/2010 07:30, Gael Varoquaux a écrit :
> On Mon, Apr 12, 2010 at 12:19:02AM +0200, Fred wrote:
>> Le 12/04/2010 00:07, Fred a écrit :
>>> I have to try another CME showing my issue...
>> I get it.
>
> I don't get the problem. I tried your example, but it seems to work fine.
> What is it that you don't like?
The glyphs are much bigger in the second case, after scaled
TransformData filter.

--
Fred

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

snapshot.png (466K) Download Attachment
snapshot2.png (990K) Download Attachment