Revision: 7115
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7115&view=rev
Author:   leejjoon
Date:     2009-05-17 22:04:38 +0000 (Sun, 17 May 2009)

Log Message:
-----------
Fix bug(#2749174) that some properties of minor ticks are not conserved.

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

Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG    2009-05-17 21:36:34 UTC (rev 7114)
+++ branches/v0_98_5_maint/CHANGELOG    2009-05-17 22:04:38 UTC (rev 7115)
@@ -1,3 +1,6 @@
+2009-05-17 Fix bug(#2749174) that some properties of minor ticks are
+           not conserved -JJL
+
 ======================================================================
 2008-05-17 Release 0.98.5.3 at r7107
 

Modified: branches/v0_98_5_maint/lib/matplotlib/axis.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/axis.py       2009-05-17 21:36:34 UTC 
(rev 7114)
+++ branches/v0_98_5_maint/lib/matplotlib/axis.py       2009-05-17 22:04:38 UTC 
(rev 7115)
@@ -1273,8 +1273,12 @@
         assert position in ('top', 'bottom', 'both', 'default', 'none')
 
 
-        ticks = list( self.get_major_ticks() )  # a copy
-        ticks.extend( self.get_minor_ticks() )
+        # The first ticks of major & minor ticks should always be
+        # included, otherwise, the information can be lost. Thus, use
+        # majorTicks instead of get_major_ticks() which may return
+        # empty list.
+        ticks = list( self.majorTicks ) # a copy
+        ticks.extend( self.minorTicks )
 
         if position == 'top':
             for t in ticks:
@@ -1514,8 +1518,12 @@
         """
         assert position in ('left', 'right', 'both', 'default', 'none')
 
-        ticks = list( self.get_major_ticks() ) # a copy
-        ticks.extend( self.get_minor_ticks() )
+        # The first ticks of major & minor ticks should always be
+        # included, otherwise, the information can be lost. Thus, use
+        # majorTicks instead of get_major_ticks() which may return
+        # empty list.
+        ticks = list( self.majorTicks ) # a copy
+        ticks.extend( self.minorTicks )
 
         if position == 'right':
             self.set_offset_position('right')


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

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to