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

Unexpected change in behavior in plt.subplot #19432

Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
@astrofrog

Description

@astrofrog

Bug report

Bug summary

#19153 introduced some changes that had (I think) unintended consequences when passing custom kwargs to projections

Code for reproduction

Prior to#19153, the following code returnedFalse, that is, two different axes were created:

fromastropy.wcsimportWCSimportmatplotlib.pyplotaspltwcs1=WCS(naxis=3)wcs1.wcs.ctype= ['x','y','z']ax1=plt.subplot(1,1,1,projection=wcs1,slices=('x','y',1))wcs2=WCS(naxis=3)wcs2.wcs.ctype= ['a','b','c']ax2=plt.subplot(1,1,1,projection=wcs2,slices=('x',2,'y'))print(ax1isax2)

No deprecation warning or future warning was raised in this case.

Following#19153, this silently ignores the projection and slices in the second call and the print statement returnsTrue.

I don't think#19153 was intended to start makingplt.subplot return the same axes in some cases, rather I thought the goal of that PR was to remove re-use of axes in certain circumstances, so I think this is a regression/bug

Actual outcome

ax1 andax2 are the same

Expected outcome

ax1 andax2 should be different

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp