[chaco] DataLabel: setting label position...

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

[chaco] DataLabel: setting label position...

fred-2
Hi all,

In the attached CME (from data_labels.py example), I would like to set
progammatically the position of the labels, ie not using the mouse.

I know DataLabel traits in concern are x, y, x2 and y2.

First of all, if I print these traits (line 68), they are all equal to 0.

Maybe because the window is not created yet?

So, how could I do what I want to do?


TIA


Cheers,

--
Fred

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

cme0.py (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [chaco] DataLabel: setting label position...

John Wiggins
Fred,
The label_position kwarg can also be a tuple. If given as a tuple, it is the x,y offset from the data point.

- John

On Wed, Dec 1, 2010 at 4:11 AM, Fred <[hidden email]> wrote:
Hi all,

In the attached CME (from data_labels.py example), I would like to set progammatically the position of the labels, ie not using the mouse.

I know DataLabel traits in concern are x, y, x2 and y2.

First of all, if I print these traits (line 68), they are all equal to 0.

Maybe because the window is not created yet?

So, how could I do what I want to do?


TIA


Cheers,

--
Fred

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



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

Re: [chaco] DataLabel: setting label position...

fred-2
Le 01/12/2010 18:12, John Wiggins a écrit :
> Fred,
> The label_position kwarg can also be a tuple. If given as a tuple, it is
> the x,y offset from the data point.

Argh, I should have seen this! :-/


Thanks again, John.


Cheers,

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