Method for graph