Revision: 5055
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5055&view=rev
Author:   efiring
Date:     2008-04-21 01:17:45 -0700 (Mon, 21 Apr 2008)

Log Message:
-----------
Bugfix: set_ticks was not respecting axis orientation

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/axis.py

Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py     2008-04-21 08:00:03 UTC (rev 
5054)
+++ trunk/matplotlib/lib/matplotlib/axis.py     2008-04-21 08:17:45 UTC (rev 
5055)
@@ -1060,8 +1060,12 @@
         """
         ### XXX if the user changes units, the information will be lost here
         ticks = self.convert_units(ticks)
-        if len(ticks):
-            self.set_view_interval(min(ticks), max(ticks))
+        if len(ticks) > 1:
+            xleft, xright = self.get_view_interval()
+            if xright > xleft:
+                self.set_view_interval(min(ticks), max(ticks))
+            else:
+                self.set_view_interval(max(ticks), min(ticks))
         if minor:
             self.set_minor_locator(FixedLocator(ticks))
             return self.get_minor_ticks(len(ticks))


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

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to