Add graph by Python.