update plot macro