Update to graphMax and labels calculation

Tailored to our project needs