Implemeted loading graph from script.