edges(Z, axis=- 1)[source]

Calculate the approximate “edge” values along an axis given “center” values. This is used internally to calculate graticule edges when you supply centers to pcolor or pcolormesh. It is also used to calculate colormap level boundaries when you supply centers to plotting methods wrapped by cmap_changer.

  • Z (array-like) – Array of any shape or size.

  • axis (int, optional) – The axis along which “edges” are calculated. The size of this axis will be increased by one.


ndarray – Array of “edge” coordinates.

See also