Revision: 6773
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6773&view=rev
Author:   efiring
Date:     2009-01-10 20:34:28 +0000 (Sat, 10 Jan 2009)

Log Message:
-----------
Fix bug in pan/zoom with log coordinates.

The zoom calculations need to be done in display coordinates.
Thanks to David Trem for bug report.

Modified Paths:
--------------
    branches/v0_98_5_maint/CHANGELOG
    branches/v0_98_5_maint/lib/matplotlib/axes.py

Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG    2009-01-10 20:05:24 UTC (rev 6772)
+++ branches/v0_98_5_maint/CHANGELOG    2009-01-10 20:34:28 UTC (rev 6773)
@@ -1,3 +1,5 @@
+2009-01-10 Fix bug in pan/zoom with log coordinates. - EF
+
 2009-01-06 Fix bug in setting of dashed negative contours. - EF
 
 2009-01-06 Be fault tolerant when len(linestyles)>NLev in contour. - MM

Modified: branches/v0_98_5_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/axes.py       2009-01-10 20:05:24 UTC 
(rev 6772)
+++ branches/v0_98_5_maint/lib/matplotlib/axes.py       2009-01-10 20:34:28 UTC 
(rev 6773)
@@ -2378,10 +2378,11 @@
                     dy = dx
 
                 alpha = np.power(10.0, (dx, dy))
-                start = p.trans_inverse.transform_point((p.x, p.y))
-                lim_points = p.lim.get_points()
-                result = start + alpha * (lim_points - start)
-                result = mtransforms.Bbox(result)
+                start = np.array([p.x, p.y])
+                oldpoints = p.lim.transformed(p.trans)
+                newpoints = start + alpha * (oldpoints - start)
+                result = mtransforms.Bbox(newpoints) \
+                    .transformed(p.trans_inverse)
             except OverflowError:
                 warnings.warn('Overflow while panning')
                 return


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to