code to draw pictures of averages