modified python graphing