Modulation of local magnetization in two-dimensional axial-next-nearest-neighbor ising model