Mike, John, or anyone else who works directly with Ticks:

I think you are the only ones who have worked with the code I suggest changing as in the attached diff. It looks to me like the three *Tick methods, set_view_interval(), get_minpos(), get_data_interval(), are unused and unlikely ever to have been or to be used. I particularly object to the first of these because I don't think a Tick has any business changing the view interval. The other two look like clutter, harmless except insofar as they make it harder to understand the code. If some projection actually does end up needing the functionality in any of these methods, it is still available via *Tick.axes.xaxis.* etc.

Am I missing something? If not, I will commit this to the trunk. This is a case where I think immediate surgery is better than a deprecation process.

Thanks.

Eric
Index: CHANGELOG
===================================================================
--- CHANGELOG	(revision 8653)
+++ CHANGELOG	(working copy)
@@ -1,3 +1,8 @@
+2010-08-21 Remove unused and inappropriate methods from Tick classes:
+           set_view_interval, get_minpos, and get_data_interval are
+           properly found in the Axis class and don't need to be
+           duplicated in XTick and YTick. - EF
+
 2010-08-21 Change Axis.set_view_interval() so that when updating an
            existing interval, it respects the orientation of that
            interval, and can enlarge but not reduce the interval.
Index: lib/matplotlib/axis.py
===================================================================
--- lib/matplotlib/axis.py	(revision 8653)
+++ lib/matplotlib/axis.py	(working copy)
@@ -262,9 +262,6 @@
         'return the view Interval instance for the axis this tick is ticking'
         raise NotImplementedError('Derived must override')
 
-    def set_view_interval(self, vmin, vmax, ignore=False):
-        raise NotImplementedError('Derived must override')
-
     def _apply_params(self, **kw):
         switchkw = ['gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On']
         switches = [k for k in kw if k in switchkw]
@@ -445,21 +442,7 @@
         'return the Interval instance for this axis view limits'
         return self.axes.viewLim.intervalx
 
-    def set_view_interval(self, vmin, vmax, ignore = False):
-        if ignore:
-            self.axes.viewLim.intervalx = vmin, vmax
-        else:
-            Vmin, Vmax = self.get_view_interval()
-            self.axes.viewLim.intervalx = min(vmin, Vmin), max(vmax, Vmax)
 
-    def get_minpos(self):
-        return self.axes.dataLim.minposx
-
-    def get_data_interval(self):
-        'return the Interval instance for this axis data limits'
-        return self.axes.dataLim.intervalx
-
-
 class YTick(Tick):
     """
     Contains all the Artists needed to make a Y tick - the tick line,
@@ -595,21 +578,7 @@
         'return the Interval instance for this axis view limits'
         return self.axes.viewLim.intervaly
 
-    def set_view_interval(self, vmin, vmax, ignore = False):
-        if ignore:
-            self.axes.viewLim.intervaly = vmin, vmax
-        else:
-            Vmin, Vmax = self.get_view_interval()
-            self.axes.viewLim.intervaly = min(vmin, Vmin), max(vmax, Vmax)
 
-    def get_minpos(self):
-        return self.axes.dataLim.minposy
-
-    def get_data_interval(self):
-        'return the Interval instance for this axis data limits'
-        return self.axes.dataLim.intervaly
-
-
 class Ticker:
     locator = None
     formatter = None
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to