let xscale = (ref (floor(!width /. float_of_int(abs(int_of_float(!xmax -. !xmin))))) : float Pervasives.ref)