Skip to content

Commit bd13535

Browse files
committed
Rename _Scale-->_ScaleBase
1 parent 5fdf5ed commit bd13535

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

proplot/axistools.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ class _dummy_axis(object):
509509
# TODO: Submit matplotlib pull request! How has no one fixed this already!
510510
axis_name = 'x'
511511

512-
class _Scale(object):
512+
class _ScaleBase(object):
513513
"""Mixin scale class that standardizes required methods."""
514514
def set_default_locators_and_formatters(self, axis, only_if_default=False):
515515
"""
@@ -561,23 +561,23 @@ def get_transform(self):
561561
"""Returns the scale transform."""
562562
return getattr(self, '_transform', mtransforms.IdentityTransform())
563563

564-
class LinearScale(_Scale, mscale.LinearScale):
564+
class LinearScale(_ScaleBase, mscale.LinearScale):
565565
"""
566566
As with `~matplotlib.scale.LinearScale`, but applies new default
567567
major formatter.
568568
"""
569569
name = 'linear'
570570
"""The registered scale name."""
571571

572-
class LogitScale(_Scale, mscale.LogitScale):
572+
class LogitScale(_ScaleBase, mscale.LogitScale):
573573
"""
574574
As with `~matplotlib.scale.LogitScale`, but applies new default
575575
major formatter.
576576
"""
577577
name = 'logit'
578578
"""The registered scale name."""
579579

580-
class LogScale(_Scale, mscale.LogScale):
580+
class LogScale(_ScaleBase, mscale.LogScale):
581581
"""
582582
As with `~matplotlib.scale.LogScale`, but applies new default major
583583
formatter and fixes the inexplicable choice to have separate "``x``" and
@@ -609,7 +609,7 @@ def __init__(self, axis, **kwargs):
609609
self._minor_locator = Locator('log', base=self.base, subs=self.subs)
610610
# self._major_formatter = Formatter('log')
611611

612-
class SymmetricalLogScale(_Scale, mscale.SymmetricalLogScale):
612+
class SymmetricalLogScale(_ScaleBase, mscale.SymmetricalLogScale):
613613
"""
614614
As with `~matplotlib.scale.SymmetricLogScale`, but applies new default
615615
major formatter and fixes the inexplicable choice to have separate "``x``"
@@ -651,7 +651,7 @@ def __init__(self, axis, **kwargs):
651651
transform=self.get_transform(), subs=self.subs)
652652
# self._major_formatter = Formatter('symlog'))
653653

654-
class FuncScale(_Scale, mscale.ScaleBase):
654+
class FuncScale(_ScaleBase, mscale.ScaleBase):
655655
"""
656656
Arbitrary scale with user-supplied forward and inverse functions and
657657
arbitrary additional transform applied thereafter. Input is a tuple
@@ -724,7 +724,7 @@ def inverted(self):
724724
#-----------------------------------------------------------------------------#
725725
# Custom scale classes
726726
#-----------------------------------------------------------------------------#
727-
class PowerScale(_Scale, mscale.ScaleBase):
727+
class PowerScale(_ScaleBase, mscale.ScaleBase):
728728
r"""
729729
Returns a "power scale" that performs the transformation
730730
@@ -795,7 +795,7 @@ def transform_non_affine(self, a):
795795
def inverted(self):
796796
return PowerTransform(self._power, self.minpos)
797797

798-
class ExpScale(_Scale, mscale.ScaleBase):
798+
class ExpScale(_ScaleBase, mscale.ScaleBase):
799799
"""
800800
An "exponential scale". When `inverse` is ``False`` (the default), this
801801
performs the transformation
@@ -884,7 +884,7 @@ def transform_non_affine(self, a):
884884
def inverted(self):
885885
return ExpTransform(self._a, self._b, self._c, self.minpos)
886886

887-
class CutoffScale(_Scale, mscale.ScaleBase):
887+
class CutoffScale(_ScaleBase, mscale.ScaleBase):
888888
"""Axis scale with arbitrary cutoffs that "accelerate" parts of the
889889
axis, "decelerate" parts of the axes, or discretely jumps between
890890
numbers.
@@ -1016,7 +1016,7 @@ def transform_non_affine(self, a):
10161016
def inverted(self):
10171017
return CutoffTransform(self._scale, self._lower, self._upper)
10181018

1019-
class MercatorLatitudeScale(_Scale, mscale.ScaleBase):
1019+
class MercatorLatitudeScale(_ScaleBase, mscale.ScaleBase):
10201020
r"""
10211021
Scales axis as with latitude in the `Mercator projection
10221022
<http://en.wikipedia.org/wiki/Mercator_projection>`__. Adapted from `this
@@ -1095,7 +1095,7 @@ def transform_non_affine(self, a):
10951095
def inverted(self):
10961096
return MercatorLatitudeTransform(self._thresh)
10971097

1098-
class SineLatitudeScale(_Scale, mscale.ScaleBase):
1098+
class SineLatitudeScale(_ScaleBase, mscale.ScaleBase):
10991099
r"""
11001100
Scales axis to be linear in the *sine* of *x* in degrees.
11011101
The scale function is as follows.
@@ -1166,7 +1166,7 @@ def transform_non_affine(self, a):
11661166
def inverted(self):
11671167
return SineLatitudeTransform()
11681168

1169-
class InverseScale(_Scale, mscale.ScaleBase):
1169+
class InverseScale(_ScaleBase, mscale.ScaleBase):
11701170
r"""
11711171
Scales axis to be linear in the *inverse* of *x*. The scale
11721172
function and inverse scale function are as follows.

0 commit comments

Comments
 (0)