add macro for plotting