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]: axis set_transform and get_transform are not related #22713

Open
@mwaskom

Description

@mwaskom

Bug summary

TheXAxis /YAxis objects attached to anAxes haveget_transform andset_transform methods, but unlike other getters/setters, you can't get the value you set.

Code for reproduction

importmatplotlibasmplimportmatplotlib.pyplotasplt_,ax=plt.subplots()xfm=mpl.scale.LogTransform(10)ax.xaxis.set_transform(xfm)print(ax.xaxis.get_transform())

Actual outcome

IdentityTransform()

Expected outcome

LogTransform(base=10, nonpositive='clip')

Additional information

I'm not sure if this is really a bug or if it's just a confusing / rough edge. The scale/transform API is fairly cumbersome, but improving that situation is a big project. Is the transform you set withaxis.set_transform ever actually used? If not, then maybeset_transform should not exist (or it should raise if called)?

Matplotlib Version

3.5.1

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