WrightTools.artists.pcolor_helper

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

Prepare a set of arrays for plotting using pcolor.

This function is Deprecated as of WrightTools 3.3.0. Matplotlib introduced the shading="nearest" in version 3.3.0 on pcolor and associated methods, which accomplishes the same goal, in a much cleaner way.

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