|
From: <ef...@us...> - 2008-04-21 08:17:48
|
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.
|