 It grows in desert scrub, sagebrush, chaparral, and other dry habitats such as inland mountain slopes, at elevations of to .It was named for its collector Josiah Gregg, who found the plant in 1847 at the site of the Battle of Buena Vista in the state of Coahuila, in northern Mexico during the Mexican–American War by Asa Gray of Harvard University in 1853.