adjust the height of the graph based on number of datapoints