Cosmic ray density gradient perpendicular to the ecliptic plane