Spatial compositional variations in magmatic minerals record chemical and physical changes in the magma from which they grew. Electron-beam techniques allow high-resolution imaging and quantitative analysis of this compositional archive for major, minor and some trace elements. In this way, magmatic processes such as crystallization, recharge in a magma chamber, decompression during ascent, and convection in the magma chamber can be identified and the history of magmatic systems prior to eruption reconstructed.