Not much of a code review, too long for a comment - suggestion:
Do a line sweep over your (iso-oriented ("axis-parallel")?) rectangles computing "vertical" and "horizontal" scales sufficient to declutter
them as needed. (With identical y-coordinates or enclosure, adjust x-scaling and vice-versa. With overlap or enclosure in both directions, main concerns are current scales and relative amount of overlap. With identical mid-point, you're screwed.)
Scale everything as computed, eyeball the result and refine your requirement description.