update to draw plot