[Matplotlib-users] zooming with transforms

2012-03-30 Thread Arnaud Gardelein
What is the most effective approach to perform a 'zoom under mouse cursor'? Currently I use the following code (considering g as mpl.Axes), but set_xlim() is called twice. Is there a better approach? # First zoom result = \ g.bbox.shrunk(DEFAULT_ZOOM_FACTOR,1).transformed(g.transData.inverted())

[Matplotlib-users] zooming with transforms

2012-03-27 Thread Arnaud Gardelein
What is the most effective approach to perform a 'zoom under mouse cursor'? Currently I use the following code (considering g as mpl.Axes), but set_xlim() is called twice. Is there a better approach? # First zoom result = \ g.bbox.shrunk(DEFAULT_ZOOM_FACTOR,1).transformed(g.transData.inverted())