macro to visualize reweighting functions