ZtoRGBpy

Version 1.0.1 Documentation

ZtoRGBpy.imshow

imshow(z, ax=None, scale=None, profile=None, **kwargs)[source]

Displays a complex image on the ax or the current axes.

Invokes matplotlib.axes.Axes.imshow on the results of remap(z, scale, profile) and attachs scale and profile to the returned object as metadata.

Parameters:
  • z (array_like [N, M]) – The complex data. This is mapped to colors based on remap(z, scale=scale, profile=profile)
  • ax (Axes, optional, default: None) – The axes to plot to. If None use the current axes like pyplot.imshow
  • scale (Scale, optional, default: None) – This parameter is passed directly to remap(z, scale=scale, profile=profile)
  • profile (RGBColorProfile, optional, default: None) – This parameter is passed directly to remap(z, scale=scale, profile=profile)
Other Parameters:
 

**kwargs (matplotlib.axes.Axes.imshow parameters) – These parameters are passed to the underlying matplotlib function

Returns:

image (matplotlib.image.AxesImage) – Extra metadata about the complex mapping is added to this object

Example

>>> import ZtoRGBpy
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> r = np.linspace(-5,5, 2001)
>>> x,y = np.meshgrid(r,r)
>>> z = x + 1j*y
>>> ZtoRGBpy.imshow(np.cos(z), extent=[-5,5,-5,5])
>>> plt.show()

(png, hires.png, pdf)

../../_images/ZtoRGBpy-imshow-1.png