A science class is investigating how the amount of sunlight affects the height of tomato plants.
One group of plants is placed in a window that receives direct sunlight for eight hours a day.
A second group is placed in a location that receives four hours of direct sunlight.
A third group is placed in a closet with no sunlight.
All plants receive the same amount of water and are planted in the same type of soil.
In this experiment, which factor is the independent variable?