hyperspy.drawing.mpl_hie module

class hyperspy.drawing.mpl_hie.MPL_HyperImage_Explorer

Bases: hyperspy.drawing.mpl_he.MPL_HyperExplorer

plot_signal(colorbar=True, scalebar=True, scalebar_color='white', axes_ticks=None, axes_off=False, saturated_pixels=None, vmin=None, vmax=None, no_nans=False, centre_colormap='auto', norm='auto', min_aspect=0.1, gamma=1.0, linthresh=0.01, linscale=0.1, **kwargs)

Plot image.

Parameters
  • colorbar (bool, optional) – If true, a colorbar is plotted for non-RGB images.

  • scalebar (bool, optional) – If True and the units and scale of the x and y axes are the same a scale bar is plotted.

  • scalebar_color (str, optional) – A valid MPL color string; will be used as the scalebar color.

  • axes_ticks ({None, bool}, optional) – If True, plot the axes ticks. If None axes_ticks are only plotted when the scale bar is not plotted. If False the axes ticks are never plotted.

  • saturated_pixels (scalar) – The percentage of pixels that are left out of the bounds. For example, the low and high bounds of a value of 1 are the 0.5% and 99.5% percentiles. It must be in the [0, 100] range. If None (default value), the value from the preferences is used.

  • vmax (vmin,) – vmin and vmax are used to normalize luminance data.

  • no_nans (bool, optional) – If True, set nans to zero for plotting.

  • centre_colormap ({"auto", True, False}) – If True the centre of the color scheme is set to zero. This is specially useful when using diverging color schemes. If “auto” (default), diverging color schemes are automatically centred.

  • min_aspect (float) – Set the minimum aspect ratio of the image and the figure. To keep the image in the aspect limit the pixels are made rectangular.

  • **kwargs – Only for Signal2D: additional (optional) keyword arguments for matplotlib.pyplot.imshow().