add code for resizing plots