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 74dbb4f

Browse filesBrowse files
committed
Add deprecation warnings for 2D classes
1 parent d2f66fe commit 74dbb4f
Copy full SHA for 74dbb4f

File tree

2 files changed

+25
-3
lines changed
Filter options

2 files changed

+25
-3
lines changed

‎lib/matplotlib/transforms.py

Copy file name to clipboardExpand all lines: lib/matplotlib/transforms.py
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,11 @@ def inverted(self):
19241924
return self._inverted
19251925

19261926

1927+
@_api.deprecated("3.9", alternative="AffineImmutable")
1928+
class Affine2DBase(AffineImmutable):
1929+
pass
1930+
1931+
19271932
def _affine_factory(mtx, dims, *args, **kwargs):
19281933
if dims == 2:
19291934
return Affine2D(mtx, *args, **kwargs)
@@ -2396,6 +2401,11 @@ def get_matrix(self):
23962401
return self._mtx
23972402

23982403

2404+
@_api.deprecated("3.9", alternative="BlendedAffine")
2405+
class BlendedAffine2D(BlendedAffine):
2406+
pass
2407+
2408+
23992409
def blended_transform_factory(*args):
24002410
"""
24012411
Create a new "blended" transform using *x_transform* to transform
@@ -2567,6 +2577,11 @@ def get_matrix(self):
25672577
return self._mtx
25682578

25692579

2580+
@_api.deprecated("3.9", alternative="CompositeAffine")
2581+
class CompositeAffine2D(CompositeAffine):
2582+
pass
2583+
2584+
25702585
def composite_transform_factory(a, b):
25712586
"""
25722587
Create a new composite transform that is the result of applying

‎lib/matplotlib/transforms.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/transforms.pyi
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ class AffineImmutable(AffineBase):
231231
def frozen(self) -> AffineImmutable: ...
232232
def to_values(self) -> tuple[float]: ...
233233

234+
class Affine2DBase(AffineImmutable):
235+
pass
236+
234237
class Affine2D(AffineImmutable):
235238
def __init__(self, matrix: ArrayLike | None = ..., **kwargs) -> None: ...
236239
@staticmethod
@@ -266,9 +269,10 @@ class BlendedGenericTransform(_BlendedMixin, Transform):
266269
def is_affine(self) -> bool: ...
267270

268271
class BlendedAffine(_BlendedMixin, AffineImmutable):
269-
def __init__(
270-
self, *args: Transform, **kwargs
271-
) -> None: ...
272+
def __init__(self, *args: Transform, **kwargs) -> None: ...
273+
274+
class BlendedAffine2D(BlendedAffine):
275+
pass
272276

273277
def blended_transform_factory(
274278
*args: Transform
@@ -283,6 +287,9 @@ class CompositeAffine(AffineImmutable):
283287
@property
284288
def depth(self) -> int: ...
285289

290+
class CompositeAffine2D(CompositeAffine):
291+
pass
292+
286293
def composite_transform_factory(a: Transform, b: Transform) -> Transform: ...
287294

288295
class BboxTransform(AffineImmutable):

0 commit comments

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