ptypy.utils.plot_utils.PtyAxis#
- class ptypy.utils.plot_utils.PtyAxis(ax=None, data=None, channel='r', cmap=None, fontsize=8, **kwargs)#
Bases:
objectPlot environment for matplotlib to allow for a Image plot with color axis, potentially of a potentially complex array.
Please note that this class may undergo changes or become obsolete altogether.
- __init__(ax=None, data=None, channel='r', cmap=None, fontsize=8, **kwargs)#
- Parameters:
ax (pyplot.axis) – An axis in matplotlib figure. If
Nonea figure with a single axis will be created.data (numpy.ndarray) – The (complex) twodimensional data to be displayed.
channel (str) –
Choose
'a'to plot absolute/modulus value of the data,'p'to plot phase value of the data,'a'to plot real value of the data,'a'to plot imaginary value of the data,'a'to plot a composite image where phase channel maps to hue and modulus channel maps to brightness of the color.
cmap (str) – String representation of one of matplotlibs colormaps.
fontsize (int) – Base font size of labels, etc.
- Keyword Arguments:
vmax (vmin,) – Minimum and maximum value for colormap scaling
rmramp (bool) – Remove phase ramp if
True, default isFalse
Methods
__init__([ax, data, channel, cmap, fontsize])add_colorbar([aspect, fraction, pad, resolution])set_channel(channel[, update])set_clims(vmin, vmax[, update])set_cmap(cmap[, update])set_data(data[, update])set_mask(mask[, update])set_psize(psize[, update])