fix plotting macro