Cosmic gradient with stars