Further updates to plotting macro