Oxygen increases during the day because oxygen is produced from photosynthesis. It uses CO2 so that decreases. At night the reverse is true but plants have very low metabolism so there is usually a net production of O2 and loss of CO2 in the plant. They metabolize like animals do but when they are photosynthesizing they make more than they use. That is why O2 increases in the day and CO2 is used up.