This is just copied from #10918 (comment) to make it easier to follow. xref SciTools/cartopy#1126
Bug report
@QuLogic:
It turns out that passing named arguments for everything broke Cartopy a bit because the first parameter of imshow there is img, not X.
It's also started explicitly passing data=None to all wrapped Axes 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 if None). 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 when None at the very least.
Code for reproduction
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import numpy as np
# First problem
ax = plt.axes(projection=crs.PlateCarree())
plt.imshow(np.zeros((100, 100)))
# Second problem
plt.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
This is just copied from #10918 (comment) to make it easier to follow. xref SciTools/cartopy#1126
Bug report
@QuLogic:
@anntzer:
@QuLogic
Code for reproduction
Matplotlib version