Fix behavior of plot when resized.