Measure and mark the 4-inch PVC pipe at the 10 inch mark. Cut the pipe along this line with a miter saw.
Hold the measuring tape on the inside of the pipe and mark the pipe every half inch with a permanent marker. These markings should start at one end; use shorter lines for the half inch intervals and longer lines for the one inch intervals.
Apply PVC glue to the inside of the PVC cap. Push the cap onto the end of the pipe where the markings start.
Place the rain gauge in your garden in a location that is unobstructed from above. Check and record the amount of water in the gauge on a daily basis.