updated R codes to set par(bg="transparent")