Intervals and graphs