adjusted plot4.R to correctly match the example's axis labels