Allow subplot= to be (ny, nx, subplot). Adapted from a patch by Anika Schmiedeke.