Create a graph from data