Plot margin handling added