Create Map from ROI in signal space#

Use the plot_roi_map() function to create interactive maps defined from ROIs in signal space.

import hyperspy.api as hs

Create a signal:

Add 2 ROIs in signal space and map the corresponding signal using plot_roi_map() The ROIs are added to the plot of the signal:

s.plot()
roi = hs.plot.plot_roi_map(s, rois=2)
  • Two Gaussians Navigator
  • Two Gaussians Signal
  • Integrated intensity Signal
  • Integrated intensity Signal

Same as above, but plotting the maps in a single figure:

s.plot()
roi = hs.plot.plot_roi_map(s, rois=2, single_figure=True)
# Choose this figure as gallery thumbnail:
# sphinx_gallery_thumbnail_number = 7
  • Two Gaussians Navigator
  • Two Gaussians Signal
  • map signal

Same as in previous step, but additionally specifying cmap and colors:

s.plot()
roi = hs.plot.plot_roi_map(s, rois=2, color=["r", "b"], cmap="gray", single_figure=True)
  • Two Gaussians Navigator
  • Two Gaussians Signal
  • map signal

Total running time of the script: (0 minutes 5.025 seconds)

Gallery generated by Sphinx-Gallery