integrated dR plotting macro