Analytical electron microscopy is a powerful tool for investigating the structural and chemical properties of magnetic materials with high spatial resolution. This is illustrated by results from two specific examples. Firstly, we show that while the MnPt layer in CoFe/MnPt exchange biased bilayers transforms from the non-magnetic fcc phase to the magnetic fct phase during annealing, the annealed MnPt layers also exhibit an undesirable increase in grain complexity. Secondly, we use electron energy loss spectroscopy to obtain elemental profiles in spin tunnel junctions being developed for MRAM application. In particular, we use the near edge fine structure present on the O K-edge to separate the signals from the AlOx barrier layer and other oxides present in the sample.