Implemented a DrawGraph method