WrightTools.artists.pcolor_helper

WrightTools.artists.pcolor_helper(xi, yi, zi=None)[source]

Prepare a set of arrays for plotting using pcolor.

The return values are suitable for feeding directly into matplotlib.pcolor such that the pixels are properly centered.

Parameters
  • xi (1D or 2D array-like) – Array of X-coordinates.

  • yi (1D or 2D array-like) – Array of Y-coordinates.

  • zi (2D array (optional, deprecated)) – If zi is not None, it is returned unchanged in the output.

Returns

  • X (2D ndarray) – X dimension for pcolor

  • Y (2D ndarray) – Y dimension for pcolor

  • zi (2D ndarray) – if zi parameter is not None, returns zi parameter unchanged