Adjusted graphing function to equalise axes scaling