sketching graphs and comparing functions