draw 1d/2d