change graph drawing method.