A Lagrangian numerical scheme for solving nonlinear degenerate Fokker–Planck equations in space dimensions $d ≥ 2$ is presented. It applies to a large class of nonlinear diffusion equations, whose dynamics are driven by internal energies and given external potentials, e.g. the porous medium equation and the fast diffusion equation. The key ingredient in our approach is the gradient flow structure of the dynamics. For discretization of the Lagrangian map, we use a finite subspace of linear maps in space and a variational form of the implicit Euler method in time. Thanks to that time discretisation, the fully discrete solution inherits energy estimates from the original gradient flow, and these lead to weak compactness of the trajectories in the continuous limit. Consistency is analyzed in the planar situation, $d = 2$. A variety of numerical experiments for the porous medium equation indicates that the scheme is well-adapted to track the growth of the solution’s support.