standardize_2d(self, func, *args, order='C', globe=False, **kwargs)[source]

Wraps contour, contourf, pcolor, pcolormesh, quiver, streamplot, and barbs, standardizes acceptable positional args and optionally modifies the x axis label, y axis label, title, and axis ticks if the a DataArray, DataFrame, or Series is passed.

Positional args are standardized as follows.

  • If x and y or latitude and longitude coordinates were not provided, and a DataFrame or DataArray is passed, we try to infer them from the metadata. Otherwise, np.arange(0, data.shape[0]) and np.arange(0, data.shape[1]) are used.

  • For pcolor and pcolormesh, coordinate edges are calculated if centers were provided. For all other methods, coordinate centers are calculated if edges were provided.

For GeoAxes and BasemapAxes, the globe keyword arg is added, suitable for plotting datasets with global coverage. Passing globe=True does the following.

  1. “Interpolates” input data to the North and South poles.

  2. Makes meridional coverage “circular”, i.e. the last longitude coordinate equals the first longitude coordinate plus 360°.

For BasemapAxes, 1D longitude vectors are also cycled to fit within the map edges. For example, if the projection central longitude is 90°, the data is shifted so that it spans -90° to 270°.