Four-dimensional electron microscopy has been applied to the detailed characterization of metal–organic-framework nanoparticles undergoing an electronic transition. The transition characteristics of a single particle were found to differ from those of an ensemble, and also to vary from one nanoparticle to the next.