Imaging electron density in a two-dimensional electron gas