Update math to work with bigger sets

The adj_ratio needs to be a smaller # depending on the number of datasets to adjust for the spacing in between the lines. Also, take the floor of the calculated height of the lines to use an integer.