ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> scipy-chaco
scipy-chaco
Re: [Chaco-users] issue with ImageInspectorTool...
by Peter Wang other posts by this author
Aug 5 2007 8:56AM messages near this date
Re: [Chaco-users] issue with ImageInspectorTool... | Re: [Chaco-users] issue with ImageInspectorTool...
On Aug 5, 2007, at 10:41 AM, fred wrote:

>  Peter Wang a écrit :
> > Yeah, there seems to be a mapper issue when zoomed in a lot.  I think
> > as of Friday afternoon Bryan was still looking into this.
> >
> >
>  BTW, how can I disable the display of the inspector ?
>  Is it possible ?

You can remove it from the image plot's list of overlays.

In a previous email you had also asked about how to just display the  
scalar value and not the RGB.  You can customize both the visibility  
of the inspector overlay and its displayed value by subclassing and  
overriding one method.  The example below shows a custom overlay that  
only displays the scalar value, and is only visible if the value is  
greater than 0.5.


from enthought.chaco2.tools.image_inspector_tool import  
ImageInspectorOverlay

class CustomOverlay(ImageInspectorOverlay):

     def _new_value_updated(self, event):
         """ *event* is a dict with two keys, 'color_value' and  
'data_value'.
             It can also be None.
         """

         # Only draw the inspector if the data value is greater than 0.5
         if event is None or event["data_value"] < 0.5:
             self.text = ""
             self.visible = False
         else:
             self.visible = True
             self.text = str(event["data_value"])

         if self.tooltip_mode:
             self.alternate_position =  
self.image_inspector.last_mouse_position
         else:
             self.alternate_position = None

         self.component.request_redraw()



-Peter

_______________________________________________
Chaco-users mailing list
Chaco-users@[...].com
https://mail.enthought.com/mailman/listinfo/chaco-users
Thread:
Fred
Bryan Van de Ven
Bryan Van de Ven
Fred
Bryan Van de Ven
Fred
Bryan Van de Ven
Fred
Peter Wang
Fred
Fred
Fred
Fred
Fred
Bryan Van de Ven
Fred
Fred
Bryan Van de Ven
Fred
Bryan Van de Ven
Fred
Bryan Van de Ven
Fred
Bryan Van de Ven
Fred
Bryan Van de Ven
Fred
Peter Wang
Fred
Peter Wang
Fred
Fred

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved