Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Bug]: get_path_collection_extents wrong when master_transform is not affine #26515

Open
@anntzer

Description

@anntzer

Bug summary

All's in the title.

Code for reproduction

frommatplotlib.pathimport*frommatplotlib.transformsimport*frommatplotlib.scaleimportLogTransformget_path_collection_extents(Affine2D().scale(2,3),    [Path([(1,2), (3,4)])], [], [(0,0)],IdentityTransform())get_path_collection_extents(blended_transform_factory(IdentityTransform(),LogTransform(10))+Affine2D().scale(2,3),    [Path([(1,2), (3,4)])], [], [(0,0)],IdentityTransform())

Actual outcome

Both expressions evaluate toBbox([[2.0, 6.0], [6.0, 12.0]]).

Expected outcome

The second expression is different.

Additional information

This probably has the same underlying cause as#7975 (implicit conversion of the non-affine transform to its affine component only). (I tried to add a warning for the deprecation in#7975 and ran into this bug.)
get_path_collection_extents is called by Collection.get_datalim; it may be possible to construct a more explicit example where the autoscaling is wrong for a suitably-constructed Collection.

Operating system

macos

Matplotlib Version

3.8.0.dev1803+gbba391d1b6

Matplotlib Backend

any

Python version

3.11.3

Jupyter version

No response

Installation

git checkout

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp