Graphic class adjusted to work with variable window size, Figure adjusted to function correspondingly
resolving conflicts