SF.net SVN: matplotlib:[8304] trunk/matplotlib/lib/matplotlib/ticker.py From: - 2010-05-10 18:58 ```Revision: 8304 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8304&view=rev Author: mdboom Date: 2010-05-10 18:58:07 +0000 (Mon, 10 May 2010) Log Message: ----------- Use a different strategy for the LogLocator for radial lines on polar plots. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2010-05-10 18:20:19 UTC (rev 8303) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2010-05-10 18:58:07 UTC (rev 8304) @@ -1196,13 +1196,14 @@ Determine the tick locations for log axes """ - def __init__(self, base=10.0, subs=[1.0]): + def __init__(self, base=10.0, subs=[1.0], numdecs=4): """ place ticks on the location= base**i*subs[j] """ self.base(base) self.subs(subs) self.numticks = 15 + self.numdecs = numdecs def base(self,base): """ @@ -1227,6 +1228,14 @@ b=self._base vmin, vmax = self.axis.get_view_interval() + + if self.axis.axes.name == 'polar': + vmax = math.ceil(math.log(vmax) / math.log(b)) + decades = np.arange(vmax - self.numdecs, vmax) + ticklocs = b ** decades + + return ticklocs + if vmin <= 0.0: vmin = self.axis.get_minpos() if vmin <= 0.0: @@ -1265,10 +1274,16 @@ def view_limits(self, vmin, vmax): 'Try to choose the view limits intelligently' + b = self._base if vmax

SF.net SVN: matplotlib:[5911] trunk/matplotlib/lib/matplotlib/ticker.py <jdh2358@us...>
 SF.net SVN: matplotlib:[7004] trunk/matplotlib/lib/matplotlib/ticker.py From: - 2009-03-24 01:57 ```Revision: 7004 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7004&view=rev Author: jdh2358 Date: 2009-03-24 01:57:26 +0000 (Tue, 24 Mar 2009) Log Message: ----------- ticker typo fixes Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2009-03-24 01:49:18 UTC (rev 7003) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2009-03-24 01:57:26 UTC (rev 7004) @@ -920,13 +920,13 @@ """ Keyword args: *prune* - Remove edge ticks -- useful for stacked or ganed plots + Remove edge ticks -- useful for stacked or ganged plots where the upper tick of one axes overlaps with the lower - tick of the axes above it. one of 'lower' | 'upper'| + tick of the axes above it. One of 'lower' | 'upper' | 'both' | None. If prune=='lower', the smallest tick will be removed. If prune=='upper', the largest tick will be removed. If prune=='both', the largest and smallest ticks - will be removed. If prune==None, no ticks will be removed + will be removed. If prune==None, no ticks will be removed. """ self._nbins = int(nbins) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```

 SF.net SVN: matplotlib:[8194] trunk/matplotlib/lib/matplotlib/ticker.py From: - 2010-03-15 20:34 ```Revision: 8194 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8194&view=rev Author: jdh2358 Date: 2010-03-15 20:34:32 +0000 (Mon, 15 Mar 2010) Log Message: ----------- fix ticker docstring bug Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2010-03-15 20:33:40 UTC (rev 8193) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2010-03-15 20:34:32 UTC (rev 8194) @@ -358,7 +358,7 @@ ''' Sets size thresholds for scientific notation. - e.g. ``xaxis.set_powerlimits((-3, 4))`` sets the pre-2007 default in + e.g. ``formatter.set_powerlimits((-3, 4))`` sets the pre-2007 default in which scientific notation is used for numbers less than 1e-3 or greater than 1e4. See also :meth:`set_scientific`. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```

 SF.net SVN: matplotlib:[8214] trunk/matplotlib/lib/matplotlib/ticker.py From: - 2010-03-25 14:17 ```Revision: 8214 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8214&view=rev Author: ryanmay Date: 2010-03-25 14:17:17 +0000 (Thu, 25 Mar 2010) Log Message: ----------- Correct docstring for ScalarFormatter to represent current behavior. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2010-03-24 04:45:19 UTC (rev 8213) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2010-03-25 14:17:17 UTC (rev 8214) @@ -318,7 +318,9 @@ Tick location is a plain old number. If useOffset==True and the data range is much smaller than the data average, then an offset will be determined such that the tick labels are meaningful. Scientific notation is used for - data < 1e-3 or data >= 1e4. + data < 10^-n or data >= 10^m, where n and m are the power limits set using + set_powerlimits((n,m)). The defaults for these are controlled by the + axes.formatter.limits rc parameter. """ def __init__(self, useOffset=True, useMathText=False): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```

 SF.net SVN: matplotlib:[8244] trunk/matplotlib/lib/matplotlib/ticker.py From: - 2010-04-19 21:02 ```Revision: 8244 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8244&view=rev Author: efiring Date: 2010-04-19 21:02:42 +0000 (Mon, 19 Apr 2010) Log Message: ----------- MaxNLocator: allow one non-keyword arg (nbins) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2010-04-19 18:28:54 UTC (rev 8243) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2010-04-19 21:02:42 UTC (rev 8244) @@ -1058,7 +1058,7 @@ integer=False, symmetric=False, prune=None) - def __init__(self, **kwargs): + def __init__(self, *args, **kwargs): """ Keyword args: @@ -1090,6 +1090,11 @@ # I left "trim" out; it defaults to True, and it is not # clear that there is any use case for False, so we may # want to remove that kwarg. EF 2010/04/18 + if args: + kwargs['nbins'] = args[0] + if len(args) > 1: + raise ValueError( + "Keywords are required for all arguments except 'nbins'") self.set_params(**self.default_params) self.set_params(**kwargs) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```

 SF.net SVN: matplotlib:[8304] trunk/matplotlib/lib/matplotlib/ticker.py From: - 2010-05-10 18:58 ```Revision: 8304 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8304&view=rev Author: mdboom Date: 2010-05-10 18:58:07 +0000 (Mon, 10 May 2010) Log Message: ----------- Use a different strategy for the LogLocator for radial lines on polar plots. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2010-05-10 18:20:19 UTC (rev 8303) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2010-05-10 18:58:07 UTC (rev 8304) @@ -1196,13 +1196,14 @@ Determine the tick locations for log axes """ - def __init__(self, base=10.0, subs=[1.0]): + def __init__(self, base=10.0, subs=[1.0], numdecs=4): """ place ticks on the location= base**i*subs[j] """ self.base(base) self.subs(subs) self.numticks = 15 + self.numdecs = numdecs def base(self,base): """ @@ -1227,6 +1228,14 @@ b=self._base vmin, vmax = self.axis.get_view_interval() + + if self.axis.axes.name == 'polar': + vmax = math.ceil(math.log(vmax) / math.log(b)) + decades = np.arange(vmax - self.numdecs, vmax) + ticklocs = b ** decades + + return ticklocs + if vmin <= 0.0: vmin = self.axis.get_minpos() if vmin <= 0.0: @@ -1265,10 +1274,16 @@ def view_limits(self, vmin, vmax): 'Try to choose the view limits intelligently' + b = self._base if vmax

 SF.net SVN: matplotlib:[8350] trunk/matplotlib/lib/matplotlib/ticker.py From: - 2010-05-31 18:44 ```Revision: 8350 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8350&view=rev Author: efiring Date: 2010-05-31 18:44:13 +0000 (Mon, 31 May 2010) Log Message: ----------- LogLocator: when using dummy axis, don't try to access axes attribute Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2010-05-31 00:14:03 UTC (rev 8349) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2010-05-31 18:44:13 UTC (rev 8350) @@ -1234,7 +1234,8 @@ vmin, vmax = self.axis.get_view_interval() - if self.axis.axes.name == 'polar': + # dummy axis has no axes attribute + if hasattr(self.axis, 'axes') and self.axis.axes.name == 'polar': vmax = math.ceil(math.log(vmax) / math.log(b)) decades = np.arange(vmax - self.numdecs, vmax) ticklocs = b ** decades This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```

 SF.net SVN: matplotlib:[8873] trunk/matplotlib/lib/matplotlib/ticker.py From: - 2011-01-03 14:53 ```Revision: 8873 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8873&view=rev Author: mdboom Date: 2011-01-03 14:53:20 +0000 (Mon, 03 Jan 2011) Log Message: ----------- [3143748] Math domain error in ticker.py is_decade() Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2011-01-03 13:45:21 UTC (rev 8872) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2011-01-03 14:53:20 UTC (rev 8873) @@ -1193,7 +1193,7 @@ return False if x == 0.0: return True - lx = np.log(x)/np.log(base) + lx = np.log(np.abs(x))/np.log(base) return is_close_to_int(lx) def is_close_to_int(x): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```