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

New function signatures in pyplot break Cartopy #12288

Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.topic: pyplot API
Milestone
@QuLogic

Description

@QuLogic

This is just copied from#10918 (comment) to make it easier to follow. xrefSciTools/cartopy#1126

Bug report

@QuLogic:

It turns out that passing named arguments for everything broke Cartopy a bit because the first parameter ofimshow there isimg, notX.
It's also started explicitly passingdata=None to all wrappedAxes methods that accept labelled data, which is slightly problematic since_preprocess_data is not public.

@anntzer:

Sorry about that. It doesn't look too hard to make pyplot pass defaultless arguments positionally instead of as keywords if you'd like.
I guess you prefer not passing data through when it's None? (There's a plan to make _preprocess_data public too but that's a side point.) Although they were already passing it before (at least in some cases, didn't check carefully) so I'm not sure what changed?

@QuLogic

We probably want to keep compatibility with old Cartopy, so we should change the positional arguments at least.

As to data, it was never explicit before, but caught by**kwargs. If never passed, it would not appear at all in the final call. Now it's there explicitly (even ifNone). I'm not sure if it should or should not be explicit in the signature, but it would be best if it's not passed whenNone at the very least.

Code for reproduction

importcartopy.crsasccrsimportmatplotlib.pyplotaspltimportnumpyasnp# First problemax=plt.axes(projection=crs.PlateCarree())plt.imshow(np.zeros((100,100)))# Second problemplt.pcolormesh(np.zeros((100,100)))

Matplotlib version

  • Operating system: Fedora 28
  • Matplotlib version: 3.0.0
  • Python version: 3.6.5
  • Other libraries: Cartopy 0.16

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp