updates get_graph and write_graph to allow for parameterizable titles and ids