code to draw pretty plots