Firstly, I read the lattice command very carefully and it truly explains a lot. However, the result is not what I expect so I have to post my question here.
For a general HCP crystal, the default x-axis can be treated as <2-1-10> and y-axis can be treated as <01-10> in LAMMPS. Now I want to select <11-20> as the x-axis and <-1100> as the y-axis. According to its geometrical calculation, the new x vector should be <1 sqrt(3) 0> and new y vector should be <-3 sqrt(3) 0>, while keep z-axis as the same. We know that values in orient option should be integer, and satisfy orthogonal condition. Thus after approximation, <1 sqrt(3) 0> —> <7 12 0>, and <-3 sqrt(3) 0> —> <-12 7 0>. i.e.,
lattice hcp a orient x 7 12 0 orient y -12 7 0 orient z 0 0 1
After a test, Lattice spacing in x = 2a ?!
In my opinion, lattice spacing in x should be still equal to a since I did not change any primitive vector components.
Thank you for the time to view my question.

Lattice spacing is just a scaling factor. Can you visualize the system and examine the actual spacing? Also note that your lattice may not be periodic with any arbitrary replications.

The lattice doc page explains the 3 lattice spacing params in detail for
rotated lattices. You should read that carefully, as it may be non-intuitive.
However, as Ray said, it is just a length parameter, that is used by various
commands. It actually does not affect the positions of the lattice points themselves.

Thank you for the reply. If I understand properly, when I rotate the lattice of HCP, then I should also change a1,a2 and a3, which is described in the warning section of lattice doc?