Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 772e1a2

Browse filesBrowse files
committed
Mixin version
1 parent 9732a3f commit 772e1a2
Copy full SHA for 772e1a2

File tree

Expand file treeCollapse file tree

2 files changed

+12
-12
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-12
lines changed

‎lib/matplotlib/scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/scale.py
+12-11Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,15 @@ def limit_range_for_scale(self, vmin, vmax, minpos):
7979
return vmin, vmax
8080

8181

82-
class TransformScaleBase(Transform):
82+
class _TransformScaleCopyable():
8383
"""Base transform for scales to allow a deep copy"""
8484
def __deepcopy__(self, memo):
8585
return self.frozen()
8686

87+
__copy__ = __deepcopy__
8788

88-
class LinearTransform(TransformScaleBase, IdentityTransform):
89-
"""Mixed class for Identity"""
89+
90+
class LinearTransform(_TransformScaleCopyable, IdentityTransform):
9091
pass
9192

9293

@@ -124,9 +125,9 @@ def get_transform(self):
124125
return LinearTransform()
125126

126127

127-
class FuncTransform(TransformScaleBase):
128+
class FuncTransform(_TransformScaleCopyable, Transform):
128129
"""
129-
A simple transform that takes and arbitrary function for the
130+
A transform that takes and arbitrary function for the
130131
forward and inverse transform.
131132
"""
132133

@@ -202,7 +203,7 @@ def set_default_locators_and_formatters(self, axis):
202203
axis.set_minor_locator(NullLocator())
203204

204205

205-
class LogTransform(TransformScaleBase):
206+
class LogTransform(_TransformScaleCopyable, Transform):
206207
input_dims = output_dims = 1
207208

208209
@_api.rename_parameter("3.3", "nonpos", "nonpositive")
@@ -244,7 +245,7 @@ def inverted(self):
244245
return InvertedLogTransform(self.base)
245246

246247

247-
class InvertedLogTransform(TransformScaleBase):
248+
class InvertedLogTransform(_TransformScaleCopyable, Transform):
248249
input_dims = output_dims = 1
249250

250251
def __init__(self, base):
@@ -370,7 +371,7 @@ def get_transform(self):
370371
return self._transform
371372

372373

373-
class SymmetricalLogTransform(TransformScaleBase):
374+
class SymmetricalLogTransform(_TransformScaleCopyable, Transform):
374375
input_dims = output_dims = 1
375376

376377
def __init__(self, base, linthresh, linscale):
@@ -402,7 +403,7 @@ def inverted(self):
402403
self.linscale)
403404

404405

405-
class InvertedSymmetricalLogTransform(TransformScaleBase):
406+
class InvertedSymmetricalLogTransform(_TransformScaleCopyable, Transform):
406407
input_dims = output_dims = 1
407408

408409
def __init__(self, base, linthresh, linscale):
@@ -505,7 +506,7 @@ def get_transform(self):
505506
return self._transform
506507

507508

508-
class LogitTransform(TransformScaleBase):
509+
class LogitTransform(_TransformScaleCopyable, Transform):
509510
input_dims = output_dims = 1
510511

511512
@_api.rename_parameter("3.3", "nonpos", "nonpositive")
@@ -531,7 +532,7 @@ def __str__(self):
531532
return "{}({!r})".format(type(self).__name__, self._nonpositive)
532533

533534

534-
class LogisticTransform(TransformScaleBase):
535+
class LogisticTransform(_TransformScaleCopyable, Transform):
535536
input_dims = output_dims = 1
536537

537538
@_api.rename_parameter("3.3", "nonpos", "nonpositive")

‎lib/matplotlib/tests/test_colors.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_colors.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,6 @@ def test_repr_html():
12691269
png = cmap._repr_png_()
12701270
assert base64.b64encode(png).decode('ascii') in html
12711271
assert cmap.name in html
1272-
<<<<<<< HEAD
12731272
assert html.startswith('<div')
12741273
assert html.endswith('</div>')
12751274

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.