Contourf plot with Robinson projection produces wrong results dependent on `central_longitude`
Description
Using contourf produces wrong plots with the Robinson projection depending on the setting of central_longitude.
Code to reproduce
import iris
import iris.plot
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
cube = iris.load_cube(path)
fig = plt.figure()
projection = ccrs.Robinson(central_longitude=0.0)
axes = fig.add_subplot(projection=projection)
axes.contourf(cube.coord('longitude').points, cube.coord('latitude').points, cube.data, cmap='bwr', levels=12, transform=ccrs.PlateCarree())
With this dataset, this produces the wrong
With this dataset, this produces the correct
Note that these plots should look very different. The extensions .txt need to be removed for the files.
Changing to central_longitude=10.0 in the code example swaps this behavior: the first example now looks fine and the second one looks weird. This also seem to depend on the number of levels.
Using pcolormesh creates nicely looking plots in all cases.
Thanks @schlunma, unfortunately this is a long-standing known problem, and hard to track down. One possible work-around is to use the transform_first option, which should also make it plot faster.
https://scitools.org.uk/cartopy/docs/latest/gallery/scalar_data/contour_transforms.html