The dependence of acceleration due to gravity g on the distance r from the centre of the earth, assumed to be a sphere of radius R of uniform density is as shown in figures below
The correct figure is
(4)
(1)
(2)
(3)
Therefore, the variation of g with distance r from centre of earth will be as shown in figure (4).