writing graphs