maxEmptyRect function

Find an empty space on a plot