Setting up a nonuniform electric field

I am using geant4.10.6.p01 on Windows 10.

I am trying to setup a non-uniform electric field. I have tried to incorporate the Purging Field example (which sets up a nonuniform magnetic field) into the field02 example (which sets up a Uniform Electric Field) (and vice versa) without too much success. It seems that Geant4 handles electric and magnetic fields differently which is causing me difficulties. Is there an example which sets up a non uniform electric field available ?