axes_manager = s.axes_manager
axes = s.axes_manager.signal_axes
extent = (axes[0].low_value,
axes[0].high_value,
axes[1].low_value,
axes[1].high_value)
im = axarr[n,m].imshow(s.data, extent=extent, interpolation='nearest')
# Axis labels and tick label settings
axarr[n,m].set_xlabel(axes[0].units,fontsize=8)
axarr[n,m].set_ylabel(axes[1].units,fontsize=8)
axarr[n,m].tick_params(axis='both', which='major', labelsize=8)
# Title information
title = s.metadata.General.title
wrappedTitle = textwrap.fill(title, 25)
axarr[n,m].set_title('%s' % (wrappedTitle),fontsize=10)
# Color bar settings
divider = make_axes_locatable(axarr[n,m])
cax = divider.append_axes("right", size="5%", pad=0.05)
cbar = plt.colorbar(im, cax = cax)
cbar.ax.tick_params(labelsize=8)
f.suptitle('EDS maps of Mn, Zr, and La before and after PCA and ICA', fontsize=12)
f.tight_layout()
left = 0.125 # the left side of the subplots of the figure
right = 0.9 # the right side of the subplots of the figure
bottom = 0.1 # the bottom of the subplots of the figure
top = 0.92 # the top of the subplots of the figure
wspace = 0.2 # the amount of width reserved for blank space between subplots
hspace = 0.01 # the amount of height reserved for white space between subplots
subplots_adjust(left=None, bottom=None, right=None, top=top, wspace=None, hspace=hspace)
plt.close('all')
f