changed the size of graph to change with the size of the data set