Thanks to all who contributed to this thread concerning how to draw something such as text at an offset relative to a data point, with the offset in screen coordinates so that it stays constant with zooming etc.
The result in svn is a new function in transforms: def offset_copy(trans, fig=None, x=0, y=0, units='inches'): ''' Return a shallow copy of a transform with an added offset. args: trans is any transform kwargs: fig is the current figure; it can be None if units are 'dots' x, y give the offset units is 'inches', 'points' or 'dots' ''' This works for all transformations including polar; an example is given in examples/transoffset.py, also in svn. All transformations now have shallowcopy and deepcopy methods; the shallowcopy method is used in offset_copy. The deepcopy methods were there all along in _transforms.cpp, with functionality apparently partly duplicated in the copy_bbox_transform function in transforms.py. John added copy_bbox_transform_shallow to transforms.py as part of this thread. I would like to remove it, together with copy_bbox_transform, on the grounds that these functions probably have not been used by anyone except during the last few days, and their functionality is available in a much more general way via the Transformation deepcopy and shallowcopy methods. Any objections? Thanks. Eric ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users