Skip to content

Commit

Permalink
Release note, deprecation notices, doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnsonTran committed Apr 21, 2024
1 parent 2dfd5b0 commit 97c7da7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 8 deletions.
Binary file modified doc/_static/transforms.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions doc/api/next_api_changes/deprecations/28098-AT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
``Affine2DBase``, ``BlendedAffine2D`` and ``CompositeAffine2D``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In order to support 3-dimensional transforms, the following deprecations have been
made. The deprecated classes can be directly replaced with the new alternatives

- ``Affine2DBase`` has been replaced with ``AffineImmutable``
- ``BlendedAffine2D`` has been replaced with ``BlendedAffine``
- ``CompositeAffine2D`` has been replaced with ``CompositeAffine``.
8 changes: 4 additions & 4 deletions doc/api/transformations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

.. automodule:: matplotlib.transforms
:members: TransformNode, BboxBase, Bbox, TransformedBbox, Transform,
TransformWrapper, AffineBase, Affine2DBase, Affine2D, IdentityTransform,
BlendedGenericTransform, BlendedAffine2D, blended_transform_factory,
CompositeGenericTransform, CompositeAffine2D,
composite_transform_factory, BboxTransform, BboxTransformTo,
TransformWrapper, AffineBase, AffineImmutable, Affine2DBase, Affine2D,
IdentityTransform, BlendedGenericTransform, BlendedAffine, BlendedAffine2D,
blended_transform_factory, CompositeGenericTransform, CompositeAffine,
CompositeAffine2D, composite_transform_factory, BboxTransform, BboxTransformTo,
BboxTransformFrom, ScaledTranslation, TransformedPath, nonsingular,
interval_contains, interval_contains_open
:show-inheritance:
Expand Down
16 changes: 16 additions & 0 deletions doc/users/next_whats_new/non_2d_transforms.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Added support for Non 2-dimensional transforms
----------------------------------------------

Support has been added for transforms in matplotlib that aren't 2D.

``AffineImmutable`` directly replaces ``Affine2DBase``, and introduces a ``dims``
keyword that specifies the dimension of the transform, defaulting to 2.

``BlendedAffine`` directly replaces ``BlendedAffine2D``, and can blend more than
two transforms, with each transform handling a different axis.

``CompositeAffine`` directly replaces ``CompositeAffine2D``, and composes two Affine
transforms, as long as they have the same dimensions.

``IdentityTransform`` can create identity matrices of any dimension, through the use of
the ``dims`` keyword.
8 changes: 4 additions & 4 deletions galleries/tutorials/artists.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,15 +463,15 @@ class in the Matplotlib API, and the one you will be working with most
# In [268]: print(rect.get_data_transform())
# CompositeGenericTransform(
# TransformWrapper(
# BlendedAffine2D(
# BlendedAffine(
# IdentityTransform(),
# IdentityTransform())),
# CompositeGenericTransform(
# BboxTransformFrom(
# TransformedBbox(
# Bbox(x0=0.0, y0=0.0, x1=1.0, y1=1.0),
# TransformWrapper(
# BlendedAffine2D(
# BlendedAffine(
# IdentityTransform(),
# IdentityTransform())))),
# BboxTransformTo(
Expand All @@ -489,15 +489,15 @@ class in the Matplotlib API, and the one you will be working with most
# In [269]: print(ax.transData)
# CompositeGenericTransform(
# TransformWrapper(
# BlendedAffine2D(
# BlendedAffine(
# IdentityTransform(),
# IdentityTransform())),
# CompositeGenericTransform(
# BboxTransformFrom(
# TransformedBbox(
# Bbox(x0=0.0, y0=0.0, x1=1.0, y1=1.0),
# TransformWrapper(
# BlendedAffine2D(
# BlendedAffine(
# IdentityTransform(),
# IdentityTransform())))),
# BboxTransformTo(
Expand Down

0 comments on commit 97c7da7

Please sign in to comment.